X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a492e5c91045ec3a66a6cea73d1fc51ffc3a699..824eec7e595ba4d1022900f24173f335ba723f8c:/src/common/rearrangectrl.cpp diff --git a/src/common/rearrangectrl.cpp b/src/common/rearrangectrl.cpp index de8b901fb2..cda19dd67f 100644 --- a/src/common/rearrangectrl.cpp +++ b/src/common/rearrangectrl.cpp @@ -25,6 +25,7 @@ #ifndef WX_PRECOMP #include "wx/button.h" + #include "wx/stattext.h" #include "wx/sizer.h" #endif // WX_PRECOMP @@ -139,11 +140,10 @@ void wxRearrangeList::OnCheck(wxCommandEvent& event) // update the internal state to match the new item state const int n = event.GetInt(); - const bool checked = IsChecked(n); - wxASSERT_MSG( (m_order[n] >= 0) == !checked, - "discrepancy between internal state and GUI" ); - m_order[n] = ~m_order[n]; + + wxASSERT_MSG( (m_order[n] >= 0) == IsChecked(n), + "discrepancy between internal state and GUI" ); } // ============================================================================