#include "wx/toolbar.h"
// ----------------------------------------------------------------------------
-// wxWindows macros
+// wxWidgets macros
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
wxCoord WXUNUSED(xPos),
wxCoord WXUNUSED(yPos))
{
+ InvalidateBestSize();
return InsertTool(GetToolsCount(), id, label, bitmap, bmpDisabled,
kind, shortHelp, longHelp, clientData);
}
{
wxWindowBase::UpdateWindowUI(flags);
+ // 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();