X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b481c72b66ac928426f5f1ab70c5ededd3334af..6e348b12dcc7f994da8c2552b80d60140578a745:/src/msw/notebook.cpp?ds=sidebyside diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 41bb070524..05b4f2c0b5 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -6,7 +6,7 @@ // Created: 11.06.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -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 // ----------------------------