X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a8945eeff6a096fed3210a3bd44e81aa895dfa61..ee3510132b8b4160f848bd4f502a6f5315f90dbc:/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; } }