Really don't do anything (including not setting the
tool's state incorrectly) if pressing on a pressed radio tool in a toolbar. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
921dd444fe
commit
4b57db792c
@ -35,7 +35,6 @@
|
||||
#endif
|
||||
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/wxcrt.h"
|
||||
#include "wx/menu.h"
|
||||
|
||||
|
||||
@ -186,6 +185,14 @@ static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget),
|
||||
|
||||
if (tool->CanBeToggled())
|
||||
{
|
||||
if (tool->IsRadio() &&
|
||||
gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget)) &&
|
||||
tool->IsToggled())
|
||||
{
|
||||
// pressed an already pressed radio button
|
||||
return;
|
||||
}
|
||||
|
||||
tool->Toggle();
|
||||
|
||||
tool->SetImage(tool->GetBitmap());
|
||||
|
Loading…
Reference in New Issue
Block a user