]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/notebook.cpp
don't waste time initializing the memory of newly created wxImage before filling...
[wxWidgets.git] / src / gtk / notebook.cpp
index cb6e7b39d410d8d9c25570f355f7d1a7ac629bd3..1e73e040c1994a5f671e2220f63ec5642652acf3 100644 (file)
@@ -334,8 +334,6 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
 
     PostCreation(size);
 
-    SetFont( parent->GetFont() );
-
     gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
                             GTK_SIGNAL_FUNC(gtk_notebook_realized_callback), (gpointer) this );
 
@@ -562,6 +560,7 @@ bool wxNotebook::DeleteAllPages()
 
     wxASSERT_MSG( GetPageCount() == 0, _T("all pages must have been deleted") );
 
+    InvalidateBestSize();
     return wxNotebookBase::DeleteAllPages();
 }
 
@@ -685,7 +684,6 @@ bool wxNotebook::InsertPage( size_t position,
     if (nb_page->m_text.IsEmpty()) nb_page->m_text = wxT("");
 
     nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) );
-       nb_page->SetFont(GetFont());
     gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding );
 
     /* show the label */
@@ -704,6 +702,7 @@ bool wxNotebook::InsertPage( size_t position,
     gtk_signal_connect( GTK_OBJECT(m_widget), "switch_page",
       GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer)this );
 
+    InvalidateBestSize();
     return TRUE;
 }