[gtk/columnview-sorting-fix] Fix gtk_column_view_sort_by_column
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/columnview-sorting-fix] Fix gtk_column_view_sort_by_column
- Date: Tue, 19 Apr 2022 00:38:17 +0000 (UTC)
commit 05e8057b5b5c9c07579a9762f0c97dbae2d91899
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 18 20:37:04 2022 -0400
Fix gtk_column_view_sort_by_column
We must clear the current sort columns before
setting the new one, to prevent double arrows
in the headers.
Fixes: #4696
gtk/gtkcolumnview.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcolumnview.c b/gtk/gtkcolumnview.c
index f475707155..017e4f4fc1 100644
--- a/gtk/gtkcolumnview.c
+++ b/gtk/gtkcolumnview.c
@@ -1703,9 +1703,8 @@ gtk_column_view_sort_by_column (GtkColumnView *self,
g_return_if_fail (column == NULL || GTK_IS_COLUMN_VIEW_COLUMN (column));
g_return_if_fail (column == NULL || gtk_column_view_column_get_column_view (column) == self);
- if (column == NULL)
- gtk_column_view_sorter_clear (GTK_COLUMN_VIEW_SORTER (self->sorter));
- else
+ gtk_column_view_sorter_clear (GTK_COLUMN_VIEW_SORTER (self->sorter));
+ if (column != NULL)
gtk_column_view_sorter_set_column (GTK_COLUMN_VIEW_SORTER (self->sorter),
column,
direction == GTK_SORT_DESCENDING);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]