fixed compilation error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -833,13 +833,10 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
|
||||
|
||||
// avoid sending the event when a radio button is released, this is not
|
||||
// interesting
|
||||
if ( tool->CanBeToggled() && tool->GetKind() == wxITEM_RADIO && !toggled )
|
||||
if ( !tool->CanBeToggled() || tool->GetKind() != wxITEM_RADIO || toggled )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// OnLeftClick() can veto the button state change - for buttons which may
|
||||
// be toggled only, of couse
|
||||
// OnLeftClick() can veto the button state change - for buttons which
|
||||
// may be toggled only, of couse
|
||||
if ( !OnLeftClick((int)id, toggled) && tool->CanBeToggled() )
|
||||
{
|
||||
// revert back
|
||||
@@ -848,6 +845,7 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
|
||||
|
||||
::SendMessage(GetHwnd(), TB_CHECKBUTTON, id, MAKELONG(toggled, 0));
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user