[gimp] app: avoid id. matrix short-circuit in trans. tool when ...



commit ee3ecb783361adff7c6a3c0779a0a500a0e731f1
Author: Ell <ell_se yahoo com>
Date:   Tue Sep 19 17:42:27 2017 -0400

    app: avoid id. matrix short-circuit in trans. tool when ...
    
    ... the matrix is not actually used
    
    Don't abort transform-tool commits when the transformation matrix
    is the identity, for transform tools that don't calculate a
    transformation matrix to begin with (i.e., the flip tool),
    otherwise they do nothing.

 app/tools/gimptransformtool.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index af6317b..34e74a2 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -991,7 +991,8 @@ gimp_transform_tool_commit (GimpTransformTool *tr_tool)
   if (tr_tool->gui)
     gimp_tool_gui_hide (tr_tool->gui);
 
-  if (gimp_matrix3_is_identity (&tr_tool->transform))
+  if (GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->recalc_matrix &&
+      gimp_matrix3_is_identity (&tr_tool->transform))
     {
       /* No need to commit an identity transformation! */
       return;


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