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:
parent
2ea5d24d16
commit
acb69c1342
@ -80,8 +80,6 @@ public:
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
// remove one page from the notebook
|
||||
bool DeletePage(size_t nPage);
|
||||
// remove all pages
|
||||
bool DeleteAllPages();
|
||||
|
||||
|
@ -80,8 +80,6 @@ public:
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
// remove one page from the notebook
|
||||
bool DeletePage(size_t nPage);
|
||||
// remove all pages
|
||||
bool DeleteAllPages();
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user