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)