[gimp/gimp-2-8] app: fix calculation for action values which can wrap around



commit e3f3f5d2bd5e8a02e410d7b1bfdf5073581b9d8c
Author: Michael Natterer <mitch gimp org>
Date:   Mon Mar 21 09:19:06 2016 +0100

    app: fix calculation for action values which can wrap around
    
    such as the brush angle action.
    
    (cherry picked from commit c0fab2402a895d644e430a811ebe92ae87e27b9e)

 app/actions/actions.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/actions/actions.c b/app/actions/actions.c
index c4ca0ab..6ee860f 100644
--- a/app/actions/actions.c
+++ b/app/actions/actions.c
@@ -529,7 +529,7 @@ action_select_value (GimpActionSelectType  select_type,
         value = max - (min - value);
 
       while (value > max)
-        value = min + (max - value);
+        value = min + (value - max);
     }
   else
     {


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