]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/rearrangectrl.cpp
Return NULL from wxWindow::GetCapture() when the capture is being lost.
[wxWidgets.git] / src / common / rearrangectrl.cpp
index c9a27121cb98bf9726e0b2f3cadfc69bf0dc8242..a6865f9036b9562cbe40fe8adb7f0297f016ac20 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     implementation of classes in wx/rearrangectrl.h
 // Author:      Vadim Zeitlin
 // Created:     2008-12-15
-// RCS-ID:      $Id$
 // Copyright:   (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -134,11 +133,11 @@ void wxRearrangeList::Swap(int pos1, int pos2)
     // first the label
     const wxString stringTmp = GetString(pos1);
     SetString(pos1, GetString(pos2));
-    Check(pos1, IsChecked(pos2));
+    SetString(pos2, stringTmp);
 
     // then the checked state
     const bool checkedTmp = IsChecked(pos1);
-    SetString(pos2, stringTmp);
+    Check(pos1, IsChecked(pos2));
     Check(pos2, checkedTmp);
 
     // and finally the client data, if necessary