]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/simplebook.h
Document wxKill(wxSIGTERM) reliance on having an open window in wxMSW.
[wxWidgets.git] / include / wx / simplebook.h
index 9b6474b0c4ce729b6ae3c914df570a9d2137ee45..795391466cae543da3ecc65e0d4e54c74cc49030 100644 (file)
@@ -156,8 +156,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()