Commit 3003ca1b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

add the passed TileManager's size to undo->size.

2007-01-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawableundo.c (gimp_drawable_undo_constructor):
	add the passed TileManager's size to undo->size.

	* app/core/gimpimage-undo-push.c (gimp_image_undo_push_drawable):
	no need to get and pass the TileManager's size here.


svn path=/trunk/; revision=21787
parent 14fa7e3a
2007-01-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawableundo.c (gimp_drawable_undo_constructor):
add the passed TileManager's size to undo->size.
* app/core/gimpimage-undo-push.c (gimp_image_undo_push_drawable):
no need to get and pass the TileManager's size here.
2007-01-28 Michael Natterer <mitch@gimp.org>
 
* app/core/Makefile.am
......@@ -134,6 +134,10 @@ gimp_drawable_undo_constructor (GType type,
drawable_undo = GIMP_DRAWABLE_UNDO (object);
g_assert (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
g_assert (drawable_undo->tiles != NULL);
GIMP_UNDO (object)->size += tile_manager_get_memsize (drawable_undo->tiles,
drawable_undo->sparse);
return object;
}
......
......@@ -702,7 +702,6 @@ gimp_image_undo_push_drawable (GimpImage *image,
{
GimpItem *item;
GimpUndo *new;
gint64 size;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
......@@ -722,10 +721,8 @@ gimp_image_undo_push_drawable (GimpImage *image,
tile_manager_height (tiles) == gimp_item_height (item),
FALSE);
size = tile_manager_get_memsize (tiles, sparse);
if ((new = gimp_image_undo_push (image, GIMP_TYPE_DRAWABLE_UNDO,
size, 0,
0, 0,
GIMP_UNDO_DRAWABLE, undo_desc,
GIMP_DIRTY_ITEM | GIMP_DIRTY_DRAWABLE,
NULL,
......
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