[gimp] app: emit signals *after* gimp_drawable_real_set_buffer() changed the graph



commit 953fa220a942dfac0d96b3a7af9bf6acd8185277
Author: Michael Natterer <mitch gimp org>
Date:   Wed Jun 24 16:26:45 2015 +0200

    app: emit signals *after* gimp_drawable_real_set_buffer() changed the graph
    
    Fixes another group layer update problem. Also freeze/thaw notify
    emissions around the whole function.

 app/core/gimpdrawable.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index ebcc5ec..dc78a83 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -831,6 +831,8 @@ gimp_drawable_real_set_buffer (GimpDrawable *drawable,
 
   old_has_alpha = gimp_drawable_has_alpha (drawable);
 
+  g_object_freeze_notify (G_OBJECT (drawable));
+
   gimp_drawable_invalidate_boundary (drawable);
 
   if (push_undo)
@@ -845,6 +847,11 @@ gimp_drawable_real_set_buffer (GimpDrawable *drawable,
 
   drawable->private->buffer = buffer;
 
+  if (drawable->private->buffer_source_node)
+    gegl_node_set (drawable->private->buffer_source_node,
+                   "buffer", gimp_drawable_get_buffer (drawable),
+                   NULL);
+
   gimp_item_set_offset (item, offset_x, offset_y);
   gimp_item_set_size (item,
                       gegl_buffer_get_width  (buffer),
@@ -853,12 +860,9 @@ gimp_drawable_real_set_buffer (GimpDrawable *drawable,
   if (old_has_alpha != gimp_drawable_has_alpha (drawable))
     gimp_drawable_alpha_changed (drawable);
 
-  if (drawable->private->buffer_source_node)
-    gegl_node_set (drawable->private->buffer_source_node,
-                   "buffer", gimp_drawable_get_buffer (drawable),
-                   NULL);
-
   g_object_notify (G_OBJECT (drawable), "buffer");
+
+  g_object_thaw_notify (G_OBJECT (drawable));
 }
 
 static void


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