X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..58dc544700817a40908f98bb8a223ae78fceeca6:/src/common/tbarbase.cpp diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index ced3746df2..b20130ec33 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -631,7 +631,7 @@ bool wxToolBarBase::IsVertical() const // Only allow toggle if returns true bool wxToolBarBase::OnLeftClick(int toolid, bool toggleDown) { - wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, toolid); + wxCommandEvent event(wxEVT_TOOL, toolid); event.SetEventObject(this); // we use SetInt() to make wxCommandEvent::IsChecked() return toggleDown @@ -651,7 +651,7 @@ void wxToolBarBase::OnRightClick(int toolid, long WXUNUSED(x), long WXUNUSED(y)) { - wxCommandEvent event(wxEVT_COMMAND_TOOL_RCLICKED, toolid); + wxCommandEvent event(wxEVT_TOOL_RCLICKED, toolid); event.SetEventObject(this); event.SetInt(toolid); @@ -665,7 +665,7 @@ void wxToolBarBase::OnRightClick(int toolid, // the tool toolid. void wxToolBarBase::OnMouseEnter(int toolid) { - wxCommandEvent event(wxEVT_COMMAND_TOOL_ENTER, GetId()); + wxCommandEvent event(wxEVT_TOOL_ENTER, GetId()); event.SetEventObject(this); event.SetInt(toolid); @@ -701,12 +701,6 @@ void wxToolBarBase::UpdateWindowUI(long flags) if ( !IsShown() ) return; - // There is no sense in updating the toolbar UI - // if the parent window is about to get destroyed - wxWindow *tlw = wxGetTopLevelParent( this ); - if (tlw && wxPendingDelete.Member( tlw )) - return; - wxEvtHandler* evtHandler = GetEventHandler() ; for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();