]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/simplebook.h
Don't enable dialog navigation inside wxFrame by default.
[wxWidgets.git] / include / wx / simplebook.h
index 9b6474b0c4ce729b6ae3c914df570a9d2137ee45..d54ebc45b6a8f9082fc8d5707ae02dd7da5640ee 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxBookCtrlBase-derived class without any controller.
 // Author:      Vadim Zeitlin
 // Created:     2012-08-21
-// RCS-ID:      $Id$
 // Copyright:   (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -156,8 +155,15 @@ protected:
 
     virtual wxWindow *DoRemovePage(size_t page)
     {
-        m_pageTexts.erase(m_pageTexts.begin() + page);
-        return wxBookCtrlBase::DoRemovePage(page);
+        wxWindow* const win = wxBookCtrlBase::DoRemovePage(page);
+        if ( win )
+        {
+            m_pageTexts.erase(m_pageTexts.begin() + page);
+
+            DoSetSelectionAfterRemoval(page);
+        }
+
+        return win;
     }
 
     virtual void DoSize()