From 58397c3cdd0eeef7b1d726b8a0f6c58dc271df8b Mon Sep 17 00:00:00 2001 From: codereader Date: Sat, 28 Jan 2017 08:06:52 +0100 Subject: [PATCH] The ResetAllSortColumns() methd is not available in wx 3.0.x Use the regular 3.0.x method conditionally --- libs/wxutil/TreeView.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/wxutil/TreeView.cpp b/libs/wxutil/TreeView.cpp index 20085df295..fbf2b87714 100644 --- a/libs/wxutil/TreeView.cpp +++ b/libs/wxutil/TreeView.cpp @@ -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)