Update internal sorting state in wxDataViewColumn::SetSortOrder()

This allows a subsequent wxDataViewModel::Resort() to actually work, see #15626
This commit is contained in:
Paul Cornett
2015-08-25 22:38:26 -07:00
parent 63615e323a
commit e77c48331b

View File

@@ -3178,12 +3178,17 @@ void wxDataViewColumn::SetSortOrder( bool ascending )
{ {
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
GtkSortType order = GTK_SORT_DESCENDING;
if (ascending) if (ascending)
gtk_tree_view_column_set_sort_order( column, GTK_SORT_ASCENDING ); order = GTK_SORT_ASCENDING;
else
gtk_tree_view_column_set_sort_order( column, GTK_SORT_DESCENDING );
gtk_tree_view_column_set_sort_order(column, order);
gtk_tree_view_column_set_sort_indicator( column, TRUE ); gtk_tree_view_column_set_sort_indicator( column, TRUE );
wxDataViewCtrlInternal* internal = m_owner->GtkGetInternal();
internal->SetSortOrder(order);
internal->SetSortColumn(m_model_column);
internal->SetDataViewSortColumn(this);
} }
bool wxDataViewColumn::IsSortOrderAscending() const bool wxDataViewColumn::IsSortOrderAscending() const