Remove wxListCtrl::EnableSortIndicator()
The old API seems unnecessarily complex, it is simpler to just let the application call ShowSortIndicator() itself from its wxEVT_LIST_COL_CLICK handler, which needs to be defined anyhow in order to actually sort the items, rather than require it to enable sort indicator, explicitly set it initially and then remember to not set it any longer in response to the column clicks. Also make RemoveSortIndicator() non-virtual and implement it simply as ShowSortIndicator(-1) because this actually simplifies the code too.
This commit is contained in:
@@ -115,10 +115,7 @@ public:
|
||||
bool IsItemChecked(long item) const wxOVERRIDE;
|
||||
void CheckItem(long item, bool check) wxOVERRIDE;
|
||||
|
||||
void EnableSortIndicator(bool enable = true) wxOVERRIDE;
|
||||
bool IsSortIndicatorEnabled() const wxOVERRIDE;
|
||||
void ShowSortIndicator(int idx, bool ascending = true) wxOVERRIDE;
|
||||
void RemoveSortIndicator() wxOVERRIDE;
|
||||
int GetSortIndicator() const wxOVERRIDE;
|
||||
bool IsAscendingSortIndicator() const wxOVERRIDE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user