]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinctrl.cpp
make wxRearrangeDialog more customizable and add an example of customizing it to...
[wxWidgets.git] / src / gtk / spinctrl.cpp
index 77a9cb485b7a47adfab488f01dd57516498ab9e2..cb2d02f4f78540169d5b65996b4452c79ba80c02 100644 (file)
@@ -113,6 +113,7 @@ bool wxSpinCtrlGTKBase::Create(wxWindow *parent, wxWindowID id,
     }
 
     m_widget = gtk_spin_button_new_with_range(min, max, inc);
+    g_object_ref(m_widget);
 
     gtk_spin_button_set_value( GTK_SPIN_BUTTON(m_widget), initial);
     m_value = gtk_spin_button_get_value( GTK_SPIN_BUTTON(m_widget));
@@ -141,7 +142,7 @@ double wxSpinCtrlGTKBase::DoGetValue() const
 
     GtkDisableEvents();
     gtk_spin_button_update( GTK_SPIN_BUTTON(m_widget) );
-    wx_const_cast(wxSpinCtrlGTKBase*, this)->m_value =
+    const_cast<wxSpinCtrlGTKBase*>(this)->m_value =
         gtk_spin_button_get_value(GTK_SPIN_BUTTON(m_widget));
     GtkEnableEvents();