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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user