]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/notebook.cpp
Smartphone fix due to separated implementation of wxFileDialog.
[wxWidgets.git] / src / gtk1 / notebook.cpp
index 1e73e040c1994a5f671e2220f63ec5642652acf3..9bd054e96fc35e49459981bbce65794698e57546 100644 (file)
@@ -564,20 +564,14 @@ bool wxNotebook::DeleteAllPages()
     return wxNotebookBase::DeleteAllPages();
 }
 
-bool wxNotebook::DeletePage( size_t page )
+wxNotebookPage *wxNotebook::DoRemovePage( size_t page )
 {
-    if ( m_selection == (int)m_pagesData.GetCount() - 1 )
+    if ( m_selection != -1 && (size_t)m_selection >= page )
     {
         // the index will become invalid after the page is deleted
         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;