]> git.saurik.com Git - wxWidgets.git/commitdiff
Really don't do anything (including not setting the
authorRobert Roebling <robert@roebling.de>
Fri, 25 May 2007 19:19:34 +0000 (19:19 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 25 May 2007 19:19:34 +0000 (19:19 +0000)
    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

src/gtk/tbargtk.cpp

index 87b8aa903fc7234aaace0da8fb0dec69ea1a5bd5..748fc45eee4c4de7c1f0b590f5effc61c795c7ad 100644 (file)
@@ -35,7 +35,6 @@
 #endif
 
 #include "wx/gtk/private.h"
 #endif
 
 #include "wx/gtk/private.h"
-#include "wx/wxcrt.h"
 #include "wx/menu.h"
 
 
 #include "wx/menu.h"
 
 
@@ -186,6 +185,14 @@ static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget),
 
     if (tool->CanBeToggled())
     {
 
     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());
         tool->Toggle();
 
         tool->SetImage(tool->GetBitmap());