X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4709ea55c2299c61ecda2ac350370f656de16ca..4362c7052b045f2ae743057d0fe8a17e053894cd:/src/univ/toolbar.cpp diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index a708a7cb74..a284182dd5 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -27,17 +27,18 @@ #if wxUSE_TOOLBAR +#include "wx/toolbar.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/app.h" + #include "wx/log.h" #endif #include "wx/univ/renderer.h" #include "wx/frame.h" -#include "wx/toolbar.h" #include "wx/image.h" -#include "wx/log.h" // ---------------------------------------------------------------------------- // constants @@ -649,20 +650,14 @@ bool wxToolBar::PerformAction(const wxControlAction& action, PerformAction( wxACTION_BUTTON_RELEASE, numArg ); PerformAction( wxACTION_BUTTON_CLICK, numArg ); - - // Write by Danny Raynor to change state again. - if( tool->IsToggled() ) - { - // Change toggle state to false - tool->Toggle(false); - } - + + // Write by Danny Raynor to change state again. // Check button still pressed or not if( tool->IsInverted() ) - { - PerformAction( wxACTION_TOOLBAR_RELEASE, numArg ); + { + PerformAction( wxACTION_TOOLBAR_RELEASE, numArg ); } - + // Set mouse leave toolbar button range (If still in the range, // toolbar button would get focus again PerformAction( wxACTION_TOOLBAR_LEAVE, numArg ); @@ -888,4 +883,3 @@ bool wxStdToolbarInputHandler::HandleActivation(wxInputConsumer *consumer, } #endif // wxUSE_TOOLBAR -