X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/681be2ef80274e6c39b243922a594c59e4983dab..f672c969519f7565cd80f85adeca5a6efdace8f5:/src/osx/notebook_osx.cpp diff --git a/src/osx/notebook_osx.cpp b/src/osx/notebook_osx.cpp index 110a36e991..7c65da4656 100644 --- a/src/osx/notebook_osx.cpp +++ b/src/osx/notebook_osx.cpp @@ -38,8 +38,6 @@ BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) - bool wxNotebook::Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -240,16 +238,7 @@ bool wxNotebook::InsertPage(size_t nPage, m_peer->SetValue( m_selection + 1 ) ; } - // some page should be selected: either this one or the first one if there - // is still no selection - int selNew = wxNOT_FOUND; - if ( bSelect ) - selNew = nPage; - else if ( m_selection == wxNOT_FOUND ) - selNew = 0; - - if ( selNew != wxNOT_FOUND ) - SetSelection( selNew ); + DoSetSelectionAfterInsertion(nPage, bSelect); InvalidateBestSize();