[gimp] Bug 787545 - GIMP records unused Transform tool into Undo history.



commit c1c0a306be6152a02d485e2accd8a7314ea0224a
Author: Jehan <jehan girinstud io>
Date:   Wed Sep 13 13:28:47 2017 +0200

    Bug 787545 - GIMP records unused Transform tool into Undo history.
    
    There is no need to commit a transformation with an identity matrix.

 app/tools/gimptransformtool.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index 8bda515..af6317b 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -991,6 +991,12 @@ 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))
+    {
+      /* No need to commit an identity transformation! */
+      return;
+    }
+
   gimp_set_busy (display->gimp);
 
   /* undraw the tool before we muck around with the transform matrix */


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