X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/134198f1b773199b5506c302bf9510831d0319f5..68ca12fef650ce4622e05ba4eb21a7aa23849107:/src/aui/auibook.cpp diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index f387d6ed67..048229f35f 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -194,9 +194,7 @@ wxAuiDefaultTabArt::wxAuiDefaultTabArt() m_tab_ctrl_height = 0; #ifdef __WXMAC__ - wxBrush toolbarbrush; - toolbarbrush.MacSetTheme( kThemeBrushToolbarBackground ); - wxColor base_colour = toolbarbrush.GetColour(); + wxColor base_colour = wxColour( wxMacCreateCGColorFromHITheme(kThemeBrushToolbarBackground)); #else wxColor base_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); #endif @@ -2865,6 +2863,9 @@ void wxAuiNotebook::InitNotebook(long style) wxAuiNotebook::~wxAuiNotebook() { + // Indicate we're deleting pages + m_isBeingDeleted = true; + while ( GetPageCount() > 0 ) DeletePage(0); @@ -3061,6 +3062,10 @@ bool wxAuiNotebook::InsertPage(size_t page_idx, bool select, const wxBitmap& bitmap) { + wxASSERT_MSG(page, wxT("page pointer must be non-NULL")); + if (!page) + return false; + page->Reparent(this); wxAuiNotebookPage info; @@ -3225,7 +3230,7 @@ bool wxAuiNotebook::RemovePage(size_t page_idx) RemoveEmptyTabFrames(); // set new active pane - if (new_active) + if (new_active && !m_isBeingDeleted) { m_curpage = -1; SetSelectionToWindow(new_active); @@ -4104,7 +4109,8 @@ void wxAuiNotebook::RemoveEmptyTabFrames() m_mgr.GetPane(first_good).Centre(); } - m_mgr.Update(); + if (!m_isBeingDeleted) + m_mgr.Update(); } void wxAuiNotebook::OnChildFocusNotebook(wxChildFocusEvent& evt)