[gimp] app: emit "profile-changed" when undoing/redoing a gray image conversion



commit 8e08f7c06e78383aa725d804d7393b5bf993f676
Author: Michael Natterer <mitch gimp org>
Date:   Wed Dec 30 19:04:53 2015 +0100

    app: emit "profile-changed" when undoing/redoing a gray image conversion
    
    So the cached display profile transform is reliably recreated.

 app/core/gimpimageundo.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpimageundo.c b/app/core/gimpimageundo.c
index 8aeb1b0..0462a25 100644
--- a/app/core/gimpimageundo.c
+++ b/app/core/gimpimageundo.c
@@ -24,6 +24,7 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include "libgimpbase/gimpbase.h"
+#include "libgimpcolor/gimpcolor.h"
 #include "libgimpconfig/gimpconfig.h"
 
 #include "core-types.h"
@@ -326,7 +327,18 @@ gimp_image_undo_pop (GimpUndo            *undo,
         gimp_image_colormap_changed (image, -1);
 
         if (image_undo->base_type != gimp_image_get_base_type (image))
-          accum->mode_changed = TRUE;
+          {
+            if ((image_undo->base_type            == GIMP_GRAY) ||
+                (gimp_image_get_base_type (image) == GIMP_GRAY))
+              {
+                /* in case ther was no profile undo, we need to emit
+                 * profile-changed anyway
+                 */
+                gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
+              }
+
+            accum->mode_changed = TRUE;
+          }
       }
       break;
 


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