Remove the native toolbar from the frame in Destroy() rather than the destructor, as removing it in the destructor causes resize / repaint events to fire on the native control, which then goes to wx controls being deleted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2009-12-25 20:43:43 +00:00
parent 849754a451
commit 1665389a9a
4 changed files with 43 additions and 32 deletions

View File

@@ -44,6 +44,8 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase
const wxString& name = wxToolBarNameStr);
virtual void SetWindowStyleFlag(long style);
virtual bool Destroy();
// override/implement base class virtuals
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
@@ -73,6 +75,7 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase
#if wxOSX_USE_NATIVE_TOOLBAR
bool MacInstallNativeToolbar(bool usesNative);
void MacUninstallNativeToolbar();
bool MacWantsNativeToolbar();
bool MacTopLevelHasNativeToolbar(bool *ownToolbarInstalled) const;
#endif