X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/906c935a80b10d53cecf57f71ab5f3f4f1d529ec..a4ea083bbdf710d3234dcbd2eafb5d0e078f8348:/src/common/tbarbase.cpp?ds=sidebyside diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index ced3746df2..e36d96eccf 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: VZ at 11.12.99 (wxScrollableToolBar split off) // Created: 04/01/98 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -631,7 +630,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 +650,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 +664,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 +700,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();