mirror of https://github.com/GNOME/gimp.git
app: argh, so much for less stupid
This commit is contained in:
parent
5a4e9d0e03
commit
40cbbf8faf
|
@ -588,6 +588,7 @@ gimp_spin_scale_change_value (GtkWidget *widget,
|
|||
gint width;
|
||||
gdouble value;
|
||||
gint digits;
|
||||
gint power = 1;
|
||||
|
||||
gimp_spin_scale_get_limits (GIMP_SPIN_SCALE (widget), &lower, &upper);
|
||||
|
||||
|
@ -622,22 +623,16 @@ gimp_spin_scale_change_value (GtkWidget *widget,
|
|||
}
|
||||
|
||||
digits = gtk_spin_button_get_digits (spin_button);
|
||||
while (digits--)
|
||||
power *= 10;
|
||||
|
||||
if (digits > 0)
|
||||
{
|
||||
gint power = 1;
|
||||
|
||||
while (digits--)
|
||||
power *= 10;
|
||||
|
||||
/* round the value to the possible precision of the spinbutton, so
|
||||
* a focus-out will not change the value again, causing inadvertend
|
||||
* adjustment signals.
|
||||
*/
|
||||
value *= power;
|
||||
value = RINT (value);
|
||||
value /= power;
|
||||
}
|
||||
/* round the value to the possible precision of the spinbutton, so
|
||||
* a focus-out will not change the value again, causing inadvertend
|
||||
* adjustment signals.
|
||||
*/
|
||||
value *= power;
|
||||
value = RINT (value);
|
||||
value /= power;
|
||||
|
||||
gtk_adjustment_set_value (adjustment, value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue