AddPage(), InsertPage() now return page ptr instead of index
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -705,13 +705,15 @@ size_t wxPropertyGridManager::GetPageCount() const
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
int wxPropertyGridManager::InsertPage( int index, const wxString& label,
|
||||
const wxBitmap& bmp, wxPropertyGridPage* pageObj )
|
||||
wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
|
||||
const wxString& label,
|
||||
const wxBitmap& bmp,
|
||||
wxPropertyGridPage* pageObj )
|
||||
{
|
||||
if ( index < 0 )
|
||||
index = GetPageCount();
|
||||
|
||||
wxCHECK_MSG( (size_t)index == GetPageCount(), -1,
|
||||
wxCHECK_MSG( (size_t)index == GetPageCount(), NULL,
|
||||
wxT("wxPropertyGridManager currently only supports appending pages (due to wxToolBar limitation)."));
|
||||
|
||||
bool needInit = true;
|
||||
@@ -826,7 +828,7 @@ int wxPropertyGridManager::InsertPage( int index, const wxString& label,
|
||||
|
||||
wxASSERT( pageObj->GetGrid() );
|
||||
|
||||
return index;
|
||||
return pageObj;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user