]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/gauge.cpp
don't access inexistent column in wxDataViewTreeCtrl::OnSize() (this bug also probabl...
[wxWidgets.git] / src / gtk / gauge.cpp
index e0b4b49010072b7797d7001f9e3a83d0b36bab21..2d299229385a1fa3052e46cac5bdc21487bb60a2 100644 (file)
@@ -31,8 +31,6 @@ bool wxGauge::Create( wxWindow *parent,
                       const wxValidator& validator,
                       const wxString& name )
 {
-    m_needParent = true;
-
     if (!PreCreation( parent, pos, size ) ||
         !CreateBase( parent, id, pos, size, style, validator, name ))
     {
@@ -43,6 +41,7 @@ bool wxGauge::Create( wxWindow *parent,
     m_rangeMax = range;
 
     m_widget = gtk_progress_bar_new();
+    g_object_ref(m_widget);
     if ( style & wxGA_VERTICAL )
     {
         gtk_progress_bar_set_orientation( GTK_PROGRESS_BAR(m_widget),
@@ -55,7 +54,7 @@ bool wxGauge::Create( wxWindow *parent,
     m_parent->DoAddChild( this );
 
     PostCreation(size);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }