]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/rearrangectrl.cpp
no real change; just reordered some implementations before real commit
[wxWidgets.git] / src / common / rearrangectrl.cpp
index de8b901fb25bf63031488fbe22c4fc55d5d284f5..cda19dd67fabf4f0d21968ce4d4e52c6f43e3b0c 100644 (file)
@@ -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" );
 }
 
 // ============================================================================