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:
@@ -447,10 +447,8 @@ public:
|
||||
virtual void CheckItem(long WXUNUSED(item), bool WXUNUSED(check)) { }
|
||||
|
||||
// Sort indicator in header.
|
||||
virtual void EnableSortIndicator(bool WXUNUSED(enable) = true) { }
|
||||
virtual bool IsSortIndicatorEnabled() const { return false; }
|
||||
virtual void ShowSortIndicator(int WXUNUSED(idx), bool WXUNUSED(ascending) = true) { }
|
||||
virtual void RemoveSortIndicator() { }
|
||||
void RemoveSortIndicator() { ShowSortIndicator(-1); }
|
||||
virtual int GetSortIndicator() const { return -1; }
|
||||
virtual bool IsAscendingSortIndicator() const { return true; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user