Skip to content

Commit

Permalink
The ResetAllSortColumns() methd is not available in wx 3.0.x
Browse files Browse the repository at this point in the history
Use the regular 3.0.x method conditionally
  • Loading branch information
codereader committed Jan 28, 2017
1 parent 9dff99d commit 58397c3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libs/wxutil/TreeView.cpp
Expand Up @@ -94,7 +94,17 @@ void TreeView::ExpandTopLevelItems()

void TreeView::ResetSortingOnAllColumns()
{
#if wxCHECK_VERSION(3, 1, 0)
ResetAllSortColumns();
#else
// We don't have ResetAllSortColumns in wxWidgets 3.0.x
wxDataViewColumn* col = GetSortingColumn();

if (col != nullptr)
{
col->UnsetAsSortKey();
}
#endif
}

void TreeView::AddSearchColumn(const TreeModel::Column& column)
Expand Down

0 comments on commit 58397c3

Please sign in to comment.