]> git.saurik.com Git - wxWidgets.git/commitdiff
restored accidentally removed code which deselects the previously selected button...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Dec 2004 13:21:33 +0000 (13:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Dec 2004 13:21:33 +0000 (13:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/radiobox.cpp

index c6e913c1c271ca3de23dbb11ebbf0e6e83c47898..b4fd6df3af11733384bbf6e5480ec1eec0158ac0 100644 (file)
@@ -378,6 +378,11 @@ void wxRadioBox::SetSelection(int N)
 {
     wxCHECK_RET( (N >= 0) && (N < GetCount()), wxT("invalid radiobox index") );
 
+    // unselect the old button
+    if ( m_selectedButton != wxNOT_FOUND )
+        ::SendMessage((*m_radioButtons)[m_selectedButton], BM_SETCHECK, 0, 0L);
+
+    // and select the new one
     ::SendMessage((*m_radioButtons)[N], BM_SETCHECK, 1, 0L);
 
     m_selectedButton = N;