X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af67f39da8ecf7c29ba5071ac49456d506c111cf..f2c94e8af58f85d60197de8245d987a602451323:/src/common/rearrangectrl.cpp diff --git a/src/common/rearrangectrl.cpp b/src/common/rearrangectrl.cpp index 6c9c0c11de..cda19dd67f 100644 --- a/src/common/rearrangectrl.cpp +++ b/src/common/rearrangectrl.cpp @@ -24,6 +24,9 @@ #endif #ifndef WX_PRECOMP + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/sizer.h" #endif // WX_PRECOMP #include "wx/rearrangectrl.h" @@ -137,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" ); } // ============================================================================