[gimp] app: some cleanup in gimp_template_notify()



commit 28e4ae341b4d3ae873019872e3ad9b5cb8477372
Author: Michael Natterer <mitch gimp org>
Date:   Sun Jun 15 21:29:34 2014 +0200

    app: some cleanup in gimp_template_notify()
    
    - use gimp_babl_mask_format() to get the new image's selection format
    - don't call g_object_notify("icon-name"), GimpViewable does that already

 app/core/gimptemplate.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/app/core/gimptemplate.c b/app/core/gimptemplate.c
index 2f32b77..840dca8 100644
--- a/app/core/gimptemplate.c
+++ b/app/core/gimptemplate.c
@@ -332,9 +332,7 @@ gimp_template_notify (GObject    *object,
   bytes = babl_format_get_bytes_per_pixel (format);
 
   /* the selection */
-  format = gimp_babl_format (GIMP_GRAY,
-                             private->precision,
-                             FALSE);
+  format = gimp_babl_mask_format (private->precision);
   bytes += babl_format_get_bytes_per_pixel (format);
 
   private->initial_size = ((guint64) bytes          *
@@ -345,9 +343,6 @@ gimp_template_notify (GObject    *object,
     gimp_projection_estimate_memsize (private->base_type,
                                       gimp_babl_component_type (private->precision),
                                       private->width, private->height);
-
-  if (! strcmp (pspec->name, "icon-name"))
-    gimp_viewable_invalidate_preview (GIMP_VIEWABLE (object));
 }
 
 


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