added new group GIMP_UNDO_GROUP_FS_REMOVE.

2004-03-29  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h (enum GimpUndoType): added new group
	GIMP_UNDO_GROUP_FS_REMOVE.

	* app/core/gimplayer-floating-sel.c (floating_sel_remove): push an
	undo group. Fixes undo corruption spotted by Pedro Gimeno.
This commit is contained in:
Michael Natterer 2004-03-29 09:57:39 +00:00 committed by Michael Natterer
parent f1de2e7d43
commit 110dc4e2d6
4 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2004-03-29 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h (enum GimpUndoType): added new group
GIMP_UNDO_GROUP_FS_REMOVE.
* app/core/gimplayer-floating-sel.c (floating_sel_remove): push an
undo group. Fixes undo corruption spotted by Pedro Gimeno.
2004-03-29 Michael Natterer <mitch@gimp.org>
* plug-ins/common/guillotine.c (guillotine): Don't just skip

View File

@ -603,6 +603,7 @@ static const GEnumValue gimp_undo_type_enum_values[] =
{ GIMP_UNDO_GROUP_FS_TO_LAYER, N_("Floating Selection to Layer"), "group-fs-to-layer" },
{ GIMP_UNDO_GROUP_FS_FLOAT, N_("Float Selection"), "group-fs-float" },
{ GIMP_UNDO_GROUP_FS_ANCHOR, N_("Anchor Floating Selection"), "group-fs-anchor" },
{ GIMP_UNDO_GROUP_FS_REMOVE, N_("Remove Floating Selection"), "group-fs-remove" },
{ GIMP_UNDO_GROUP_EDIT_PASTE, N_("Paste"), "group-edit-paste" },
{ GIMP_UNDO_GROUP_EDIT_CUT, N_("Cut"), "group-edit-cut" },
{ GIMP_UNDO_GROUP_TEXT, N_("Text"), "group-text" },

View File

@ -433,6 +433,7 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_FS_TO_LAYER, /*< desc="Floating Selection to Layer" >*/
GIMP_UNDO_GROUP_FS_FLOAT, /*< desc="Float Selection" >*/
GIMP_UNDO_GROUP_FS_ANCHOR, /*< desc="Anchor Floating Selection" >*/
GIMP_UNDO_GROUP_FS_REMOVE, /*< desc="Remove Floating Selection" >*/
GIMP_UNDO_GROUP_EDIT_PASTE, /*< desc="Paste" >*/
GIMP_UNDO_GROUP_EDIT_CUT, /*< desc="Cut" >*/
GIMP_UNDO_GROUP_TEXT, /*< desc="Text" >*/

View File

@ -94,6 +94,9 @@ floating_sel_remove (GimpLayer *layer)
gimage = gimp_item_get_image (GIMP_ITEM (layer->fs.drawable));
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_FS_REMOVE,
_("Remove Floating Selection"));
/* store the affected area from the drawable in the backing store */
floating_sel_relax (layer, TRUE);
@ -105,6 +108,8 @@ floating_sel_remove (GimpLayer *layer)
/* remove the layer from the gimage */
gimp_image_remove_layer (gimage, layer);
gimp_image_undo_group_end (gimage);
}
void