Added m_nSelection = -1 fixes to RemovePage, DeleteAllPages (from Scott Newham)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a925b00678
commit
47f12f58db
@ -329,6 +329,9 @@ bool wxNotebook::RemovePage(int nPage)
|
||||
|
||||
m_aPages.Remove(nPage);
|
||||
|
||||
if ( m_aPages.IsEmpty() )
|
||||
m_nSelection = -1;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -344,6 +347,8 @@ bool wxNotebook::DeleteAllPages()
|
||||
|
||||
TabCtrl_DeleteAllItems(m_hwnd);
|
||||
|
||||
m_nSelection = -1;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user