revert previous change. Instead, don't push undos if the item is not

2005-08-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c (gimp_item_parasite_attach): revert previous
	change. Instead, don't push undos if the item is not attached.
This commit is contained in:
Michael Natterer 2005-08-05 17:36:24 +00:00 committed by Michael Natterer
parent f2ecfca131
commit 1755b50bd8
2 changed files with 23 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2005-08-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.c (gimp_item_parasite_attach): revert previous
change. Instead, don't push undos if the item is not attached.
2005-08-05 Sven Neumann <sven@gimp.org>
* app/xcf/xcf-load.c (xcf_load_image): disable undo while the

View File

@ -1081,29 +1081,29 @@ gimp_item_parasite_attach (GimpItem *item,
{
g_return_if_fail (GIMP_IS_ITEM (item));
/* only set the dirty bit manually if we can be saved and the new
* parasite differs from the current one and we aren't undoable
*/
if (gimp_parasite_is_undoable (parasite))
if (gimp_item_is_attached (item))
{
/* skip undo if it is disabled, for example while loading an XCF */
if (gimp_image_undo_is_enabled (item->gimage))
/* only set the dirty bit manually if we can be saved and the new
* parasite differs from the current one and we aren't undoable
*/
if (gimp_parasite_is_undoable (parasite))
{
/* do a group in case we have attach_parent set */
gimp_image_undo_group_start (item->gimage,
GIMP_UNDO_GROUP_PARASITE_ATTACH,
_("Attach Parasite"));
gimp_image_undo_push_item_parasite (item->gimage,
NULL, item, parasite);
gimp_image_undo_push_item_parasite (item->gimage, NULL, item,
parasite);
}
else if (gimp_parasite_is_persistent (parasite) &&
! gimp_parasite_compare (parasite,
gimp_item_parasite_find
(item, gimp_parasite_name (parasite))))
{
gimp_image_undo_push_cantundo (item->gimage,
_("Attach Parasite to Item"));
}
}
else if (gimp_parasite_is_persistent (parasite) &&
! gimp_parasite_compare (parasite,
gimp_item_parasite_find
(item, gimp_parasite_name (parasite))))
{
gimp_image_undo_push_cantundo (item->gimage,
_("Attach Parasite to Item"));
}
gimp_parasite_list_add (item->parasites, parasite);
@ -1120,8 +1120,8 @@ gimp_item_parasite_attach (GimpItem *item,
gimp_parasite_attach (item->gimage->gimp, parasite);
}
if (gimp_parasite_is_undoable (parasite) &&
gimp_image_undo_is_enabled (item->gimage))
if (gimp_item_is_attached (item) &&
gimp_parasite_is_undoable (parasite))
{
gimp_image_undo_group_end (item->gimage);
}