[gimp] app: make the FS' drawable update itself when the active components change



commit b16f75b8aff4fba8474574ad07e2cfe6fd8de66a
Author: Michael Natterer <mitch gimp org>
Date:   Fri Apr 12 15:58:42 2013 +0200

    app: make the FS' drawable update itself when the active components change
    
    which removes more FS knowledge from the image.

 app/core/gimpdrawable.c |    7 +++++++
 app/core/gimpimage.c    |    8 --------
 2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index 78db80d..186e478 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -1089,7 +1089,14 @@ gimp_drawable_fs_image_changed (GimpImage       *image,
                                 GimpChannelType  channel,
                                 GimpDrawable    *drawable)
 {
+  GimpLayer *fs = gimp_drawable_get_floating_sel (drawable);
+
   gimp_drawable_sync_fs_filter (drawable, FALSE);
+
+  gimp_drawable_update (GIMP_DRAWABLE (fs),
+                        0, 0,
+                        gimp_item_get_width  (GIMP_ITEM (fs)),
+                        gimp_item_get_height (GIMP_ITEM (fs)));
 }
 
 static void
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 4695aae..16ffcc8 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2250,16 +2250,8 @@ gimp_image_set_component_active (GimpImage       *image,
 
   if (index != -1 && active != private->active[index])
     {
-      GimpLayer *floating_sel = gimp_image_get_floating_selection (image);
-
       private->active[index] = active ? TRUE : FALSE;
 
-      if (floating_sel)
-        gimp_drawable_update (GIMP_DRAWABLE (floating_sel),
-                              0, 0,
-                              gimp_item_get_width  (GIMP_ITEM (floating_sel)),
-                              gimp_item_get_height (GIMP_ITEM (floating_sel)));
-
       /*  If there is an active channel and we mess with the components,
        *  the active channel gets unset...
        */


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