X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/681be2ef80274e6c39b243922a594c59e4983dab..04b11eb3fb65462b5654cbb732aaf4898a93dd6c:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index f5487c26b9..046096b05f 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -842,16 +842,7 @@ bool wxNotebook::InsertPage(size_t nPage, m_selection++; } - // 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();