]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinctrl.cpp
update OpenVMS makefile
[wxWidgets.git] / src / gtk / spinctrl.cpp
index 2d48ca16dce936ec8f79b22e229c8079881172c2..1d2b31a00cddd8e11fc9b14216855c231dce667c 100644 (file)
@@ -257,7 +257,12 @@ void wxSpinCtrlGTKBase::DoSetIncrement(double inc)
     wxCHECK_RET( m_widget, "invalid spin button" );
 
     GtkDisableEvents();
-    gtk_spin_button_set_increments( GTK_SPIN_BUTTON(m_widget), inc, 10*inc);
+
+    // Preserve the old page value when changing just the increment.
+    double page = 10*inc;
+    gtk_spin_button_get_increments( GTK_SPIN_BUTTON(m_widget), NULL, &page);
+
+    gtk_spin_button_set_increments( GTK_SPIN_BUTTON(m_widget), inc, page);
     GtkEnableEvents();
 }
 
@@ -347,8 +352,6 @@ wxSpinCtrlGTKBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
 // wxSpinCtrl
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxSpinCtrlGTKBase)
-
 //-----------------------------------------------------------------------------
 // wxSpinCtrlDouble
 //-----------------------------------------------------------------------------