Commit 1755b50b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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.
parent f2ecfca1
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
......
......@@ -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);
}
......
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