Programatically checking wxRearrangeList item does not update checked info in its order list
|Reported by:||PB||Owned by:|
When calling SetCheck() on wxRearrangeControl, its m_order list containing not only the order of its items but also their state is not updated; SetCheck() is a method inherited from wxCheckListBox.
How to reproduce (the debug build):
- Create a wxRearrangeControl and toggle an item selection programatically.
- Attempt to (un)check the same item manually in the UI.
- Assert pops up:
src\common\rearrangectrl.cpp(176): assert "(m_order[n] >= 0) == IsChecked(n)" failed in wxRearrangeList::OnCheck(): discrepancy between internal state and GUI
The patch modifying dialogs sample demonstrates the issues using wxRearrangeDialog. Run the patched sample, open the dialog (Ctrl+R) and click the checkbox of the first item to invoke the assert dialog.
I can test only on MSW, so I don't know if it works on other OSes.