Reuse wxBookCtrlBase::DeleteAllPages() in wxNotebook
Don't duplicate the base class code unnecessarily. No real changes.
This commit is contained in:
parent
96f9a12898
commit
3d37b8c72a
@ -586,7 +586,6 @@ bool wxNotebook::DeleteAllPages()
|
||||
|
||||
wxASSERT_MSG( GetPageCount() == 0, wxT("all pages must have been deleted") );
|
||||
|
||||
InvalidateBestSize();
|
||||
return wxNotebookBase::DeleteAllPages();
|
||||
}
|
||||
|
||||
|
@ -622,19 +622,11 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
|
||||
// remove all pages
|
||||
bool wxNotebook::DeleteAllPages()
|
||||
{
|
||||
size_t nPageCount = GetPageCount();
|
||||
size_t nPage;
|
||||
for ( nPage = 0; nPage < nPageCount; nPage++ )
|
||||
delete m_pages[nPage];
|
||||
|
||||
m_pages.Clear();
|
||||
wxBookCtrlBase::DeleteAllPages();
|
||||
|
||||
if ( !TabCtrl_DeleteAllItems(GetHwnd()) )
|
||||
wxLogLastError(wxS("TabCtrl_DeleteAllItems()"));
|
||||
|
||||
m_selection = wxNOT_FOUND;
|
||||
|
||||
InvalidateBestSize();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -199,11 +199,10 @@ wxNotebookPage* wxNotebook::DoRemovePage(size_t nPage)
|
||||
// remove all pages
|
||||
bool wxNotebook::DeleteAllPages()
|
||||
{
|
||||
WX_CLEAR_ARRAY(m_pages);
|
||||
wxBookCtrlBase::DeleteAllPages();
|
||||
|
||||
m_images.clear();
|
||||
MacSetupTabs();
|
||||
m_selection = wxNOT_FOUND ;
|
||||
InvalidateBestSize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user