]> git.saurik.com Git - wxWidgets.git/commitdiff
Added m_nSelection = -1 fixes to RemovePage, DeleteAllPages (from Scott Newham)
authorJulian Smart <julian@anthemion.co.uk>
Tue, 9 Nov 1999 01:53:44 +0000 (01:53 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 9 Nov 1999 01:53:44 +0000 (01:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/notebook.cpp

index aec8a9979a0c1c4ca61c98a0d27f1132a3acad83..d2fe79e5575a770a55b2a422975b06dd98447b22 100644 (file)
@@ -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;
 }