From acb69c13429f8c1d0392bb6e9caed2ca43f2472a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 30 Jul 2004 23:38:36 +0000 Subject: [PATCH] invalidate m_selection in DoRemovePage(), not in DeletePage() (replaces patch 998984) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/notebook.h | 2 -- include/wx/gtk1/notebook.h | 2 -- src/gtk/notebook.cpp | 8 +------- src/gtk1/notebook.cpp | 8 +------- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/include/wx/gtk/notebook.h b/include/wx/gtk/notebook.h index 1830da0e9e..d19a9cd6d6 100644 --- a/include/wx/gtk/notebook.h +++ b/include/wx/gtk/notebook.h @@ -80,8 +80,6 @@ public: // operations // ---------- - // remove one page from the notebook - bool DeletePage(size_t nPage); // remove all pages bool DeleteAllPages(); diff --git a/include/wx/gtk1/notebook.h b/include/wx/gtk1/notebook.h index 1830da0e9e..d19a9cd6d6 100644 --- a/include/wx/gtk1/notebook.h +++ b/include/wx/gtk1/notebook.h @@ -80,8 +80,6 @@ public: // operations // ---------- - // remove one page from the notebook - bool DeletePage(size_t nPage); // remove all pages bool DeleteAllPages(); diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 91114c0491..9bd054e96f 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -564,7 +564,7 @@ bool wxNotebook::DeleteAllPages() return wxNotebookBase::DeleteAllPages(); } -bool wxNotebook::DeletePage( size_t page ) +wxNotebookPage *wxNotebook::DoRemovePage( size_t page ) { if ( m_selection != -1 && (size_t)m_selection >= page ) { @@ -572,12 +572,6 @@ bool wxNotebook::DeletePage( size_t page ) 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; diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index 91114c0491..9bd054e96f 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -564,7 +564,7 @@ bool wxNotebook::DeleteAllPages() return wxNotebookBase::DeleteAllPages(); } -bool wxNotebook::DeletePage( size_t page ) +wxNotebookPage *wxNotebook::DoRemovePage( size_t page ) { if ( m_selection != -1 && (size_t)m_selection >= page ) { @@ -572,12 +572,6 @@ bool wxNotebook::DeletePage( size_t page ) 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; -- 2.47.2