app: handle negative fractions correctly in spinscale

This commit is contained in:
Øyvind Kolås
2012-03-31 00:50:51 +01:00
committed by Michael Natterer
parent 93864e3082
commit 8994acc6a8

View File

@ -464,6 +464,7 @@ gimp_spin_scale_change_value (GtkWidget *widget,
gdouble fraction; gdouble fraction;
fraction = x / (gdouble) width; fraction = x / (gdouble) width;
if (fraction > 0.0)
fraction = pow (fraction, private->gamma); fraction = pow (fraction, private->gamma);
value = fraction * (upper - lower) + lower; value = fraction * (upper - lower) + lower;