diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h index 14ae37fb0e..b6941fe64e 100644 --- a/include/wx/msw/notebook.h +++ b/include/wx/msw/notebook.h @@ -91,13 +91,8 @@ public: // ---------- // remove all pages bool DeleteAllPages(); - // adds a new page to the notebook (it will be deleted ny the notebook, + // inserts a new page to the notebook (it will be deleted ny the notebook, // don't delete it yourself). If bSelect, this page becomes active. - bool AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // the same as AddPage(), but adds it at the specified position bool InsertPage(int nPage, wxNotebookPage *pPage, const wxString& strText, diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 84c156cb33..05b4f2c0b5 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -385,15 +385,6 @@ bool wxNotebook::DeleteAllPages() return TRUE; } -// add a page to the notebook -bool wxNotebook::AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect, - int imageId) -{ - return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId); -} - // same as AddPage() but does it at given position bool wxNotebook::InsertPage(int nPage, wxNotebookPage *pPage, @@ -405,6 +396,8 @@ bool wxNotebook::InsertPage(int nPage, wxCHECK_MSG( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE, _T("invalid index in wxNotebook::InsertPage") ); + wxASSERT_MSG( pPage->GetParent() == this, + _T("notebook pages must have notebook as parent") ); // add a new tab to the control // ----------------------------