From 34b0e534f82e5347383c4760d33506a0260ceed4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Mar 2016 18:42:02 +0100 Subject: [PATCH] Make wxDataViewCtrl::IsMultiColumnSortAllowed() exist in all ports Contrary to the documentation, this method only existed in the generic control, add it to the base class now so that the code using it could compile when using the native ports too. --- include/wx/dataview.h | 3 +++ include/wx/generic/dataview.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 8364cdbd78..b709434aba 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -662,6 +662,9 @@ public: return !allow; } + // Return true if multi column sort is currently allowed. + virtual bool IsMultiColumnSortAllowed() const { return false; } + // This should also be overridden to actually use the specified column for // sorting if using multiple columns is supported. virtual void ToggleSortByColumn(int WXUNUSED(column)) { } diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index 4f7ca80c76..6f89ee6165 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -227,7 +227,7 @@ public: virtual bool SetFont(const wxFont & font) wxOVERRIDE; virtual bool AllowMultiColumnSort(bool allow) wxOVERRIDE; - virtual bool IsMultiColumnSortAllowed() { return m_allowMultiColumnSort; } + virtual bool IsMultiColumnSortAllowed() const wxOVERRIDE { return m_allowMultiColumnSort; } virtual void ToggleSortByColumn(int column) wxOVERRIDE; #if wxUSE_DRAG_AND_DROP