]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/notebook_osx.cpp
Add markup support to wxOSX/Cocoa wxStaticText and wxButton.
[wxWidgets.git] / src / osx / notebook_osx.cpp
index 110a36e9916afb6e8361326fb054ed6e76590da3..7c65da46567d322965a3207efe21dc1987630644 100644 (file)
@@ -38,8 +38,6 @@ BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
 END_EVENT_TABLE()
 
-IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase)
-
 bool wxNotebook::Create( wxWindow *parent,
     wxWindowID id,
     const wxPoint& pos,
@@ -240,16 +238,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();