From a8b3cea302deee679e1b3b42b61e0bb6110a5513 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 18 Oct 2010 23:43:09 +0000 Subject: [PATCH] Correct recently broken checked state handling in wxRearrangeList. The checked state of them wasn't preserved correctly any more since r64875, correct this by changing the state only after storing the old one. Closes #12578. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/rearrangectrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/rearrangectrl.cpp b/src/common/rearrangectrl.cpp index c9a27121cb..2e0ba1bcc6 100644 --- a/src/common/rearrangectrl.cpp +++ b/src/common/rearrangectrl.cpp @@ -134,11 +134,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 -- 2.45.2