]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/notebook.cpp
Use locale-specific decimal point in wxNumericPropertyValidator (fixes #12790)
[wxWidgets.git] / src / os2 / notebook.cpp
index fb45fe10a3e64131652bd3d23bf4b46fd09356ed..f0a88c0c6ab57d8ea4ea7e8cf961f5af95a25e0a 100644 (file)
@@ -648,19 +648,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
         pPage->Show(false);
     }
 
-    //
-    // Some page should be selected: either this one or the first one if there is
-    // still no selection
-    //
-    int nSelNew = wxNOT_FOUND;
-
-    if (bSelect)
-        nSelNew = nPage;
-    else if ( m_selection == wxNOT_FOUND )
-        nSelNew = 0;
-
-    if (nSelNew != wxNOT_FOUND)
-        SetSelection(nSelNew);
+    DoSetSelectionAfterInsertion(nPage, bSelect);
 
     InvalidateBestSize();