[gimp] app: don't commit trivial warp transform



commit d12dd3fb351851e4026bb9dfada69a99006b62d0
Author: Ell <ell_se yahoo com>
Date:   Sat Sep 29 12:35:27 2018 -0400

    app: don't commit trivial warp transform
    
    In the warp tool, don't commit a trivial (empty) transform.  This
    is especially important now that exiting the tool through undo
    causes it to get comitted (... with a trivial transform).

 app/tools/gimpwarptool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 077c45b09f..513d60f2ff 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -753,7 +753,8 @@ gimp_warp_tool_commit (GimpWarpTool *wt)
 {
   GimpTool *tool = GIMP_TOOL (wt);
 
-  if (wt->filter)
+  /* don't commit a nop */
+  if (tool->display && gimp_tool_can_undo (tool, tool->display))
     {
       gimp_tool_control_push_preserve (tool->control, TRUE);
 


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