[gimp] Revert "app (selectiontool): Drop dead code"



commit abaf846578b71bf7db77b78ce740a3b39b4554ad
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Oct 12 19:30:58 2011 +0530

    Revert "app (selectiontool): Drop dead code"
    
    This reverts commit c0083d24e61def3640a62c121f595b1cd5974235. It was
    decided that although this code doesn't have an effect, it needs to be
    modified to be fixed.

 app/tools/gimpselectiontool.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimpselectiontool.c b/app/tools/gimpselectiontool.c
index f83d32b..64e8c6a 100644
--- a/app/tools/gimpselectiontool.c
+++ b/app/tools/gimpselectiontool.c
@@ -101,7 +101,7 @@ gimp_selection_tool_modifier_key (GimpTool        *tool,
       key == modify_mask ||
       key == GDK_MOD1_MASK)
     {
-      GimpChannelOps button_op;
+      GimpChannelOps button_op = options->operation;
 
       if (press)
         {
@@ -114,6 +114,17 @@ gimp_selection_tool_modifier_key (GimpTool        *tool,
               selection_tool->saved_operation = options->operation;
             }
         }
+      else
+        {
+          if (! (state & (extend_mask |
+                          modify_mask |
+                          GDK_MOD1_MASK)))
+            {
+              /*  last modifier released  */
+
+              button_op = selection_tool->saved_operation;
+            }
+        }
 
       if (state & GDK_MOD1_MASK)
         {



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