invalidate selection when deleting the page changes its index (replaces patch 865500)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-07-25 17:12:28 +00:00
parent 7c9955536a
commit f2f38edc2c
2 changed files with 2 additions and 2 deletions

View File

@@ -566,7 +566,7 @@ bool wxNotebook::DeleteAllPages()
bool wxNotebook::DeletePage( size_t page )
{
if ( m_selection == (int)m_pagesData.GetCount() - 1 )
if ( m_selection >= page )
{
// the index will become invalid after the page is deleted
m_selection = -1;