[gimp] app: push an undo group around assigning a color profile
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: push an undo group around assigning a color profile
- Date: Sun, 16 Aug 2015 19:23:31 +0000 (UTC)
commit d05bcba33df2221dd38a2182b82358387c9e6c23
Author: Michael Natterer <mitch gimp org>
Date: Sun Aug 16 21:22:12 2015 +0200
app: push an undo group around assigning a color profile
We now potentially change two parasites not just one.
app/dialogs/color-profile-dialog.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/app/dialogs/color-profile-dialog.c b/app/dialogs/color-profile-dialog.c
index 9ae51f3..6dea59b 100644
--- a/app/dialogs/color-profile-dialog.c
+++ b/app/dialogs/color-profile-dialog.c
@@ -39,6 +39,7 @@
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-color-profile.h"
+#include "core/gimpimage-undo.h"
#include "core/gimpprogress.h"
#include "widgets/gimphelp-ids.h"
@@ -398,6 +399,10 @@ color_profile_dialog_response (GtkWidget *widget,
}
else
{
+ gimp_image_undo_group_start (dialog->image,
+ GIMP_UNDO_GROUP_PARASITE_ATTACH,
+ _("Assign color profile"));
+
success = gimp_image_set_color_profile (dialog->image,
dest_profile,
&error);
@@ -405,6 +410,11 @@ color_profile_dialog_response (GtkWidget *widget,
/* omg... */
if (success)
gimp_image_parasite_detach (dialog->image, "icc-profile-name");
+
+ gimp_image_undo_group_end (dialog->image);
+
+ if (! success)
+ gimp_image_undo (dialog->image);
}
if (success)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]