[gimp] app: GimpCageTool: go to deform mode only if the user clicked the first handle



commit 6899b0bf609233628f81823e17975595e5c303c8
Author: Michael Natterer <mitch gimp org>
Date:   Wed Mar 30 11:51:51 2011 +0200

    app: GimpCageTool: go to deform mode only if the user clicked the first handle
    
    and not if it was only moved.

 app/tools/gimpcagetool.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpcagetool.c b/app/tools/gimpcagetool.c
index 2e0c9e5..59cb715 100644
--- a/app/tools/gimpcagetool.c
+++ b/app/tools/gimpcagetool.c
@@ -647,7 +647,7 @@ gimp_cage_tool_button_release (GimpTool              *tool,
 
   gimp_tool_control_halt (tool->control);
 
-  if (state & GDK_BUTTON3_MASK)
+  if (release_type == GIMP_BUTTON_RELEASE_CANCEL)
     {
       /* Cancelling */
 
@@ -687,7 +687,9 @@ gimp_cage_tool_button_release (GimpTool              *tool,
         case CAGE_STATE_CLOSING:
           ct->dirty_coef = TRUE;
           gimp_cage_config_commit_displacement (ct->config);
-          g_object_set (options, "cage-mode", GIMP_CAGE_MODE_DEFORM, NULL);
+
+          if (release_type == GIMP_BUTTON_RELEASE_CLICK)
+            g_object_set (options, "cage-mode", GIMP_CAGE_MODE_DEFORM, NULL);
           break;
 
         case CAGE_STATE_MOVE_HANDLE:



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