Allow using wxRearrangeList::Check() to change state programmatically.

Previous this resulted in an assert and broken behaviour as it didn't update
the internally stored state. Do update it now and remove the assert as it
isn't possible to distinguish between user code calling Check() and wxGTK
doing it itself from wxCheckListBox implementation.

Closes #15940.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-02-04 15:59:52 +00:00
parent 8942262811
commit 9d05d9a009
3 changed files with 24 additions and 7 deletions

View File

@@ -95,6 +95,10 @@ public:
bool MoveCurrentUp();
bool MoveCurrentDown();
// Override this to keep our m_order array in sync with the real item state.
virtual void Check(unsigned int item, bool check = true);
private:
// swap two items at the given positions in the listbox
void Swap(int pos1, int pos2);