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
wxAuiNotebook::~wxAuiNotebook()
{
+ // Indicate we're deleting pages
+ m_isBeingDeleted = true;
+
while ( GetPageCount() > 0 )
DeletePage(0);
bool select,
const wxBitmap& bitmap)
{
+ wxASSERT_MSG(page, wxT("page pointer must be non-NULL"));
+ if (!page)
+ return false;
+
page->Reparent(this);
wxAuiNotebookPage info;
RemoveEmptyTabFrames();
// set new active pane
- if (new_active)
+ if (new_active && !m_isBeingDeleted)
{
m_curpage = -1;
SetSelectionToWindow(new_active);
m_mgr.GetPane(first_good).Centre();
}
- m_mgr.Update();
+ if (!m_isBeingDeleted)
+ m_mgr.Update();
}
void wxAuiNotebook::OnChildFocusNotebook(wxChildFocusEvent& evt)