Commit 9c132bf8 authored by Simon Budig's avatar Simon Budig Committed by Simon Budig

wrapped some actions in a gimp_undo_push_group_start/end, so you dont have

2001-01-24  Simon Budig  <simon@gimp.org>

        * 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.
parent ced452d4
2001-01-24 Simon Budig <simon@gimp.org>
* 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 <mitch@gimp.org> 2001-01-24 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/.cvsignore * libgimpwidgets/.cvsignore
......
...@@ -188,6 +188,7 @@ run (gchar *name, ...@@ -188,6 +188,7 @@ run (gchar *name,
if (status == GIMP_PDB_SUCCESS) if (status == GIMP_PDB_SUCCESS)
{ {
gimp_undo_push_group_start (image_ID);
/* Add alpha if not present */ /* Add alpha if not present */
gimp_layer_add_alpha (drawable->id); gimp_layer_add_alpha (drawable->id);
drawable = gimp_drawable_get (drawable->id); drawable = gimp_drawable_get (drawable->id);
...@@ -200,14 +201,20 @@ run (gchar *name, ...@@ -200,14 +201,20 @@ run (gchar *name,
gimp_progress_init (_("Removing color...")); gimp_progress_init (_("Removing color..."));
toalpha (drawable); 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) if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_colortoalpha", &pvals, sizeof (pvals)); gimp_set_data ("plug_in_colortoalpha", &pvals, sizeof (pvals));
values[0].data.d_status = status; values[0].data.d_status = status;
gimp_drawable_detach (drawable);
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment