No real changes, just replace -1 with wxNOT_FOUND in wxBookCtrl code.
Make the code consistently use wxNOT_FOUND instead of -1 everywhere. See #12622. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -268,13 +268,13 @@ bool wxNotebook::InsertPage(size_t nPage,
|
||||
|
||||
// some page should be selected: either this one or the first one if there
|
||||
// is still no selection
|
||||
int selNew = -1;
|
||||
int selNew = wxNOT_FOUND;
|
||||
if ( bSelect )
|
||||
selNew = nPage;
|
||||
else if ( m_nSelection == -1 )
|
||||
selNew = 0;
|
||||
|
||||
if ( selNew != -1 )
|
||||
if ( selNew != wxNOT_FOUND )
|
||||
SetSelection( selNew );
|
||||
|
||||
InvalidateBestSize();
|
||||
@@ -508,10 +508,10 @@ void wxNotebook::ChangePage(int nOldSel, int nSel)
|
||||
if (nOldSel == nSel)
|
||||
return;
|
||||
|
||||
if ( nOldSel != -1 )
|
||||
if ( nOldSel != wxNOT_FOUND )
|
||||
m_pages[nOldSel]->Show( false );
|
||||
|
||||
if ( nSel != -1 )
|
||||
if ( nSel != wxNOT_FOUND )
|
||||
{
|
||||
wxNotebookPage *pPage = m_pages[nSel];
|
||||
if ( IsShownOnScreen() )
|
||||
|
||||
Reference in New Issue
Block a user