[gimp/soc-2012-unified-transformation: 42/52] transformtool: Update modifier keys for options, solves problem with perspective frompivot + constra



commit d48aa08846b3a32091da10cd4a67fe00932925f9
Author: Mikael Magnusson <mikachu src gnome org>
Date:   Sat Aug 11 11:18:26 2012 +0200

    transformtool: Update modifier keys for options, solves problem with perspective frompivot + constrain

 app/tools/gimptransformoptions.c     |    6 +++---
 app/tools/gimptransformtool.c        |    8 ++++----
 app/tools/gimpunifiedtransformtool.c |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/app/tools/gimptransformoptions.c b/app/tools/gimptransformoptions.c
index 966715c..cefdbe6 100644
--- a/app/tools/gimptransformoptions.c
+++ b/app/tools/gimptransformoptions.c
@@ -435,11 +435,11 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
         gchar *name;
         gchar *desc;
       } opt_list[] = {
+        { shift, "constrain", "Constrain movement (%s)" },
         { shift, "keepaspect", "Keep aspect (%s)" },
-        { shift, "freeshear", "Move edge freely in shearing (%s)" },
         { ctrl, "frompivot", "Scale from pivot / Symmetric shearing (%s)" },
-        { ctrl, "cornersnap", "Snap pivot point to corners/center (%s)" },
-        { ctrl, "constrain", "Constrain movement (%s)" },
+        { shift, "freeshear", "Move edge freely in shearing (%s)" },
+        { shift, "cornersnap", "Snap pivot point to corners/center (%s)" },
         { 0, "fixedpivot", "Lock pivot to canvas" },
       };
 
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index 59f545d..88d61ed 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -494,16 +494,16 @@ gimp_transform_tool_modifier_key (GimpTool        *tool,
       g_object_set (options,
                     "frompivot", ! options->frompivot,
                     NULL);
+    }
+
+  if (key == gimp_get_extend_selection_mask ())
+    {
       g_object_set (options,
                     "cornersnap", ! options->cornersnap,
                     NULL);
       g_object_set (options,
                     "constrain", ! options->constrain,
                     NULL);
-    }
-
-  if (key == gimp_get_extend_selection_mask ())
-    {
       g_object_set (options,
                     "keepaspect", ! options->keepaspect,
                     NULL);
diff --git a/app/tools/gimpunifiedtransformtool.c b/app/tools/gimpunifiedtransformtool.c
index add2670..44fa635 100644
--- a/app/tools/gimpunifiedtransformtool.c
+++ b/app/tools/gimpunifiedtransformtool.c
@@ -962,7 +962,7 @@ gimp_unified_transform_tool_motion (GimpTransformTool *transform_tool)
 
       newpos[this] = vectoradd (oldpos[this], d);
 
-      if (frompivot && transform_is_convex (newpos)) //TODO constrain and frompivot are both bound to ctrl
+      if (frompivot && transform_is_convex (newpos))
         {
           GimpVector2 delta = getpivotdelta (transform_tool, oldpos, newpos, pivot);
 



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