X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a8945eeff6a096fed3210a3bd44e81aa895dfa61..bc5a847c1b4d89a9e26a3ac7b9e75f41b7530316:/src/gtk1/tbargtk.cpp diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index e0e94b95f4..81e71e29d1 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -99,11 +99,8 @@ static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget), wxapp_install_idle_handler(); wxToolBar *tbar = (wxToolBar *)tool->GetToolBar(); - if ( tbar->m_blockNextEvent ) - { - tbar->m_blockNextEvent = FALSE; - return; - } + + if (tbar->m_blockEvent) return; if (g_blockEventsOnDrag) return; if (!tool->IsEnabled()) return; @@ -196,7 +193,7 @@ void wxToolBar::Init() m_fg = m_bg = (GdkColor *)NULL; m_toolbar = (GtkToolbar *)NULL; - m_blockNextEvent = FALSE; + m_blockEvent = FALSE; } wxToolBar::~wxToolBar() @@ -440,9 +437,11 @@ void wxToolBar::DoToggleTool( wxToolBarToolBase *toolBase, bool toggle ) gtk_pixmap_set( pixmap, bitmap.GetPixmap(), mask ); } - m_blockNextEvent = TRUE; // we cannot use gtk_signal_disconnect here + m_blockEvent = TRUE; gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(item), toggle ); + + m_blockEvent = FALSE; } }