From: Robert Roebling Date: Fri, 25 May 2007 19:19:34 +0000 (+0000) Subject: Really don't do anything (including not setting the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4b57db792ca0dc3f548c2c5b7d20f615e55d68a1 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 --- diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 87b8aa903f..748fc45eee 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -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());