X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/681be2ef80274e6c39b243922a594c59e4983dab..1c7ce073474469e25aedb6c203fdb6f549d18870:/src/osx/notebook_osx.cpp diff --git a/src/osx/notebook_osx.cpp b/src/osx/notebook_osx.cpp index 110a36e991..fb58c48509 100644 --- a/src/osx/notebook_osx.cpp +++ b/src/osx/notebook_osx.cpp @@ -240,16 +240,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();