]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicbkg.cpp
Rework IE virtual file system support to use new syntax. Remove now unused code for...
[wxWidgets.git] / src / generic / choicbkg.cpp
index 09e9465ffdde4f0e1522ec1debaf0a2547c79521..52fd088591cea7cd805d9751d00e7d084297bcde 100644 (file)
@@ -195,20 +195,9 @@ wxChoicebook::InsertPage(size_t n,
         GetChoiceCtrl()->Select(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 = n;
-    else if ( m_selection == wxNOT_FOUND )
-        selNew = 0;
-
-    if ( selNew != m_selection )
+    if ( !DoSetSelectionAfterInsertion(n, bSelect) )
         page->Hide();
 
-    if ( selNew != wxNOT_FOUND )
-        SetSelection(selNew);
-
     return true;
 }