[gimp] app: handle negative fractions correctly in spinscale



commit 8994acc6a83b9653fc8c814bbb163a743b081851
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sat Mar 31 00:50:51 2012 +0100

    app: handle negative fractions correctly in spinscale

 app/widgets/gimpspinscale.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpspinscale.c b/app/widgets/gimpspinscale.c
index 445763c..245d4de 100644
--- a/app/widgets/gimpspinscale.c
+++ b/app/widgets/gimpspinscale.c
@@ -464,7 +464,8 @@ gimp_spin_scale_change_value (GtkWidget *widget,
       gdouble fraction;
 
       fraction = x / (gdouble) width;
-      fraction = pow (fraction, private->gamma);
+      if (fraction > 0.0)
+        fraction = pow (fraction, private->gamma);
 
       value = fraction * (upper - lower) + lower;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]