Reset previous sort column in generic wxDataViewColumn::SetSortOrder().
The sort indicator on the column previously used for sorting was only reset when the user clicked on the column header (by wxDataViewHeaderWindow code that explicitly called wxDataViewCtrl::SetSortingColumnIndex()) but not when wxDataViewCtrl::SetSortOrder() was called directly. Fix this and take care of updating everything in SetSortOrder() itself. This makes the code simpler and also means that calling SetSortOrder() from the program now works as expected (it resulted in having sort indicators in two columns at once before). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -72,12 +72,7 @@ public:
|
||||
|
||||
virtual void UnsetAsSortKey() { m_sort = false; UpdateDisplay(); }
|
||||
|
||||
virtual void SetSortOrder(bool ascending)
|
||||
{
|
||||
m_sort = true;
|
||||
m_sortAscending = ascending;
|
||||
UpdateDisplay();
|
||||
}
|
||||
virtual void SetSortOrder(bool ascending);
|
||||
|
||||
virtual bool IsSortOrderAscending() const { return m_sortAscending; }
|
||||
|
||||
|
Reference in New Issue
Block a user