[gimp] app: fix undo/redo of profile assign/convert operations
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix undo/redo of profile assign/convert operations
- Date: Mon, 17 Aug 2015 09:22:44 +0000 (UTC)
commit 39de67cf4e5db5ee695018b8f4a57521f8be2b5b
Author: Michael Natterer <mitch gimp org>
Date: Mon Aug 17 11:21:48 2015 +0200
app: fix undo/redo of profile assign/convert operations
The undo code needs to update the image's cached GimpColorProfile too.
app/core/gimpimageundo.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpimageundo.c b/app/core/gimpimageundo.c
index b5dec65..2806990 100644
--- a/app/core/gimpimageundo.c
+++ b/app/core/gimpimageundo.c
@@ -489,7 +489,23 @@ gimp_image_undo_pop (GimpUndo *undo,
name = parasite ? parasite->name : image_undo->parasite_name;
if (strcmp (name, GIMP_ICC_PROFILE_PARASITE_NAME) == 0)
- gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
+ {
+ if (private->color_profile)
+ {
+ g_object_unref (private->color_profile);
+ private->color_profile = NULL;
+ }
+
+ if (parasite)
+ {
+ private->color_profile =
+ gimp_color_profile_new_from_icc_profile (gimp_parasite_data (parasite),
+ gimp_parasite_data_size (parasite),
+ NULL);
+ }
+
+ gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
+ }
if (parasite)
gimp_parasite_free (parasite);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]