X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63fb6907346c40b1d174a188e919c1bc3eb5094e..46405e36bf9962b251e77e5048e96bf6a54edb15:/src/gtk/spinctrl.cpp diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index 2d48ca16dc..d84c02d39d 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -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(); }