Also implement wxDataViewColumn::UnsetAsSortKey() for wxGTK

Allow to reset the sort order in native GTK+ implementation too.

See #18176.
This commit is contained in:
Vadim Zeitlin
2018-07-28 02:54:44 +02:00
parent 2a59c1fb20
commit 4af7d4e0d5
3 changed files with 13 additions and 0 deletions

View File

@@ -3345,6 +3345,17 @@ void wxDataViewColumn::SetSortOrder( bool ascending )
internal->SetDataViewSortColumn(this);
}
void wxDataViewColumn::UnsetAsSortKey()
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
gtk_tree_view_column_set_sort_indicator( column, FALSE );
wxDataViewCtrlInternal* internal = m_owner->GtkGetInternal();
internal->SetSortColumn(-1);
internal->SetDataViewSortColumn(NULL);
}
bool wxDataViewColumn::IsSortOrderAscending() const
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);