[gimp] app: don't preserve() GimpImageMapTool around most GimpImageMap calls



commit 68936e4cc24b92bd8dfd4b9aec5dff50511ff054
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 9 21:48:16 2016 +0200

    app: don't preserve() GimpImageMapTool around most GimpImageMap calls
    
    It's useles ever since we ported GimpImageMap to GEGL.

 app/tools/gimpimagemaptool.c |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c
index d7b7e4e..35883ba 100644
--- a/app/tools/gimpimagemaptool.c
+++ b/app/tools/gimpimagemaptool.c
@@ -701,23 +701,15 @@ gimp_image_map_tool_options_notify (GimpTool         *tool,
     {
       if (im_options->preview)
         {
-          gimp_tool_control_push_preserve (tool->control, TRUE);
-
           gimp_image_map_apply (im_tool->image_map, NULL);
 
-          gimp_tool_control_pop_preserve (tool->control);
-
           if (im_options->preview_split)
             gimp_image_map_tool_add_guide (im_tool);
         }
       else
         {
-          gimp_tool_control_push_preserve (tool->control, TRUE);
-
           gimp_image_map_abort (im_tool->image_map);
 
-          gimp_tool_control_pop_preserve (tool->control);
-
           if (im_options->preview_split)
             gimp_image_map_tool_remove_guide (im_tool);
         }
@@ -878,14 +870,10 @@ gimp_image_map_tool_halt (GimpImageMapTool *im_tool)
 
   if (im_tool->image_map)
     {
-      gimp_tool_control_push_preserve (tool->control, TRUE);
-
       gimp_image_map_abort (im_tool->image_map);
       g_object_unref (im_tool->image_map);
       im_tool->image_map = NULL;
 
-      gimp_tool_control_pop_preserve (tool->control);
-
       gimp_image_map_tool_remove_guide (im_tool);
     }
 
@@ -904,11 +892,11 @@ gimp_image_map_tool_commit (GimpImageMapTool *im_tool)
     {
       GimpImageMapOptions *options = GIMP_IMAGE_MAP_TOOL_GET_OPTIONS (tool);
 
-      gimp_tool_control_push_preserve (tool->control, TRUE);
-
       if (! options->preview)
         gimp_image_map_apply (im_tool->image_map, NULL);
 
+      gimp_tool_control_push_preserve (tool->control, TRUE);
+
       gimp_image_map_commit (im_tool->image_map, GIMP_PROGRESS (tool), TRUE);
       g_object_unref (im_tool->image_map);
       im_tool->image_map = NULL;
@@ -998,11 +986,7 @@ gimp_image_map_tool_preview (GimpImageMapTool *im_tool)
 
   if (im_tool->image_map && options->preview)
     {
-      gimp_tool_control_push_preserve (tool->control, TRUE);
-
       gimp_image_map_apply (im_tool->image_map, NULL);
-
-      gimp_tool_control_pop_preserve (tool->control);
     }
 }
 


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