[gimp] app: fix calculation for action values which can wrap around



commit c0fab2402a895d644e430a811ebe92ae87e27b9e
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.

 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 5076079..4c6c1f2 100644
--- a/app/actions/actions.c
+++ b/app/actions/actions.c
@@ -535,7 +535,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]