]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
Create work-around for wxGetEnvMap on OpenVMS (correction)
[wxWidgets.git] / src / msw / notebook.cpp
index f5487c26b980e3f86a4912e566372502bbd457ee..046096b05f5a63ef886f2cfc5e0dca7e385f83d3 100644 (file)
@@ -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();