invalidate m_selection in DoRemovePage(), not in DeletePage() (replaces patch 998984)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-07-30 23:38:36 +00:00
parent 2ea5d24d16
commit acb69c1342
4 changed files with 2 additions and 18 deletions

View File

@ -80,8 +80,6 @@ public:
// operations
// ----------
// remove one page from the notebook
bool DeletePage(size_t nPage);
// remove all pages
bool DeleteAllPages();

View File

@ -80,8 +80,6 @@ public:
// operations
// ----------
// remove one page from the notebook
bool DeletePage(size_t nPage);
// remove all pages
bool DeleteAllPages();

View File

@ -564,7 +564,7 @@ bool wxNotebook::DeleteAllPages()
return wxNotebookBase::DeleteAllPages();
}
bool wxNotebook::DeletePage( size_t page )
wxNotebookPage *wxNotebook::DoRemovePage( size_t page )
{
if ( m_selection != -1 && (size_t)m_selection >= page )
{
@ -572,12 +572,6 @@ bool wxNotebook::DeletePage( size_t page )
m_selection = -1;
}
// it will call our DoRemovePage() to do the real work
return wxNotebookBase::DeletePage(page);
}
wxNotebookPage *wxNotebook::DoRemovePage( size_t page )
{
wxNotebookPage *client = wxNotebookBase::DoRemovePage(page);
if ( !client )
return NULL;

View File

@ -564,7 +564,7 @@ bool wxNotebook::DeleteAllPages()
return wxNotebookBase::DeleteAllPages();
}
bool wxNotebook::DeletePage( size_t page )
wxNotebookPage *wxNotebook::DoRemovePage( size_t page )
{
if ( m_selection != -1 && (size_t)m_selection >= page )
{
@ -572,12 +572,6 @@ bool wxNotebook::DeletePage( size_t page )
m_selection = -1;
}
// it will call our DoRemovePage() to do the real work
return wxNotebookBase::DeletePage(page);
}
wxNotebookPage *wxNotebook::DoRemovePage( size_t page )
{
wxNotebookPage *client = wxNotebookBase::DoRemovePage(page);
if ( !client )
return NULL;