From 9c132bf8b2fbbedced4b8452c122fc87ffa4b7de Mon Sep 17 00:00:00 2001 From: Simon Budig Date: Wed, 24 Jan 2001 20:40:16 +0000 Subject: [PATCH] wrapped some actions in a gimp_undo_push_group_start/end, so you dont have 2001-01-24 Simon Budig * plug-ins/common/colortoalpha.c: wrapped some actions in a gimp_undo_push_group_start/end, so you dont have to undo two steps when the plugin adds an alpha channel. --- ChangeLog | 6 ++++++ plug-ins/common/colortoalpha.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54ed8577c6..4ace0f35e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-01-24 Simon Budig + + * plug-ins/common/colortoalpha.c: wrapped some actions in a + gimp_undo_push_group_start/end, so you dont have to undo + two steps when the plugin adds an alpha channel. + 2001-01-24 Michael Natterer * libgimpwidgets/.cvsignore diff --git a/plug-ins/common/colortoalpha.c b/plug-ins/common/colortoalpha.c index 733c6e2e3f..416bd6c249 100644 --- a/plug-ins/common/colortoalpha.c +++ b/plug-ins/common/colortoalpha.c @@ -188,6 +188,7 @@ run (gchar *name, if (status == GIMP_PDB_SUCCESS) { + gimp_undo_push_group_start (image_ID); /* Add alpha if not present */ gimp_layer_add_alpha (drawable->id); drawable = gimp_drawable_get (drawable->id); @@ -200,14 +201,20 @@ run (gchar *name, gimp_progress_init (_("Removing color...")); toalpha (drawable); - gimp_displays_flush (); } + gimp_drawable_detach (drawable); + gimp_undo_push_group_end (image_ID); + gimp_displays_flush (); } + else + { + gimp_drawable_detach (drawable); + } + if (run_mode == GIMP_RUN_INTERACTIVE) gimp_set_data ("plug_in_colortoalpha", &pvals, sizeof (pvals)); values[0].data.d_status = status; - gimp_drawable_detach (drawable); } static void -- GitLab