restored accidentally removed code which deselects the previously selected button in SetSelection()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -378,6 +378,11 @@ void wxRadioBox::SetSelection(int N)
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( (N >= 0) && (N < GetCount()), wxT("invalid radiobox index") );
|
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);
|
::SendMessage((*m_radioButtons)[N], BM_SETCHECK, 1, 0L);
|
||||||
|
|
||||||
m_selectedButton = N;
|
m_selectedButton = N;
|
||||||
|
Reference in New Issue
Block a user