X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c9a19aabab3a878b565e6c2a5f2a3824277c4dc..a5e3c24d7b0b954b0408697a211d004e4a55051d:/src/msw/notebook.cpp 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 // ----------------------------