[gimp] app: make sure GimpTransformTool draws correctly after options changes



commit 74f276fe4fb3f982d63eefa4a3326a9c91a286a4
Author: Michael Natterer <mitch gimp org>
Date:   Sat Mar 26 21:53:06 2011 +0100

    app: make sure GimpTransformTool draws correctly after options changes

 app/tools/gimptransformtool.c |   38 +++++++++++++-------------------------
 1 files changed, 13 insertions(+), 25 deletions(-)
---
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index 219bdf1..28b7d61 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -746,12 +746,14 @@ gimp_transform_tool_options_notify (GimpTool         *tool,
     {
       GimpTransformOptions *tr_options = GIMP_TRANSFORM_OPTIONS (options);
 
+      if (tr_tool->function != TRANSFORM_CREATING)
+        {
+          gimp_draw_tool_pause (GIMP_DRAW_TOOL (tr_tool));
+        }
+
       if (! strcmp (pspec->name, "type") ||
           ! strcmp (pspec->name, "direction"))
         {
-          if (tr_tool->function != TRANSFORM_CREATING)
-            gimp_draw_tool_pause (GIMP_DRAW_TOOL (tr_tool));
-
           tr_tool->type      = tr_options->type;
           tr_tool->direction = tr_options->direction;
 
@@ -765,8 +767,6 @@ gimp_transform_tool_options_notify (GimpTool         *tool,
                   /*  recalculate the tool's transformation matrix  */
                   gimp_transform_tool_recalc (tr_tool, tool->display);
                 }
-
-              gimp_draw_tool_resume (GIMP_DRAW_TOOL (tr_tool));
             }
         }
 
@@ -799,16 +799,6 @@ gimp_transform_tool_options_notify (GimpTool         *tool,
                   gimp_display_shell_set_show_transform (shell, FALSE);
                   gimp_transform_tool_force_expose_preview (tr_tool);
                 }
-
-              if (tr_tool->function != TRANSFORM_CREATING)
-                {
-                  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tr_tool));
-
-                  gimp_transform_tool_grid_recalc (tr_tool);
-                  gimp_transform_tool_transform_bounding_box (tr_tool);
-
-                  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tr_tool));
-                }
               break;
 
             case GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE:
@@ -835,19 +825,17 @@ gimp_transform_tool_options_notify (GimpTool         *tool,
 
                   gimp_transform_tool_force_expose_preview (tr_tool);
                 }
-
-              if (tr_tool->function != TRANSFORM_CREATING)
-                {
-                  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tr_tool));
-
-                  gimp_transform_tool_grid_recalc (tr_tool);
-                  gimp_transform_tool_transform_bounding_box (tr_tool);
-
-                  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tr_tool));
-                }
               break;
             }
         }
+
+      if (tr_tool->function != TRANSFORM_CREATING)
+        {
+          gimp_transform_tool_grid_recalc (tr_tool);
+          gimp_transform_tool_transform_bounding_box (tr_tool);
+
+          gimp_draw_tool_resume (GIMP_DRAW_TOOL (tr_tool));
+        }
     }
 
   if (! strcmp (pspec->name, "constrain"))



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