call gimp_drawable_update() on the destination drawable.

2007-06-27  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/tile.c (tile): call gimp_drawable_update() on
	the destination drawable.

	* plug-ins/common/tiff-load.c: formatting.

svn path=/trunk/; revision=22844
This commit is contained in:
Sven Neumann 2007-06-27 08:15:54 +00:00 committed by Sven Neumann
parent 4625597ab8
commit a956d53689
3 changed files with 27 additions and 19 deletions

View file

@ -1,3 +1,10 @@
2007-06-27 Sven Neumann <sven@gimp.org>
* plug-ins/common/tile.c (tile): call gimp_drawable_update() on
the destination drawable.
* plug-ins/common/tiff-load.c: formatting.
2007-06-27 Michael Natterer <mitch@gimp.org> 2007-06-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpimagemap.c (gimp_image_map_clear) * app/core/gimpimagemap.c (gimp_image_map_clear)

View file

@ -1095,7 +1095,7 @@ load_rgba (TIFF *tif,
0, 0, imageWidth, imageLength, TRUE, FALSE); 0, 0, imageWidth, imageLength, TRUE, FALSE);
buffer = g_new (uint32, imageWidth * imageLength); buffer = g_new (uint32, imageWidth * imageLength);
channel[0].pixels = (guchar*) buffer; channel[0].pixels = (guchar *) buffer;
if (!TIFFReadRGBAImage (tif, imageWidth, imageLength, buffer, 0)) if (!TIFFReadRGBAImage (tif, imageWidth, imageLength, buffer, 0))
g_message ("Unsupported layout, no RGBA loader"); g_message ("Unsupported layout, no RGBA loader");

View file

@ -262,6 +262,7 @@ tile (gint32 image_id,
new_image_id = gimp_image_new (tvals.new_width, tvals.new_height, new_image_id = gimp_image_new (tvals.new_width, tvals.new_height,
image_type); image_type);
gimp_image_undo_disable (new_image_id); gimp_image_undo_disable (new_image_id);
*layer_id = gimp_layer_new (new_image_id, _("Background"), *layer_id = gimp_layer_new (new_image_id, _("Background"),
tvals.new_width, tvals.new_height, tvals.new_width, tvals.new_height,
gimp_drawable_type (drawable_id), gimp_drawable_type (drawable_id),
@ -273,7 +274,7 @@ tile (gint32 image_id,
gimp_image_add_layer (new_image_id, *layer_id, 0); gimp_image_add_layer (new_image_id, *layer_id, 0);
new_layer = gimp_drawable_get (*layer_id); new_layer = gimp_drawable_get (*layer_id);
/* Get the specified drawable */ /* Get the source drawable */
drawable = gimp_drawable_get (drawable_id); drawable = gimp_drawable_get (drawable_id);
} }
else else
@ -289,7 +290,7 @@ tile (gint32 image_id,
tvals.new_width, tvals.new_height, tvals.new_width, tvals.new_height,
0, 0); 0, 0);
/* Get the specified drawable */ /* Get the source drawable */
drawable = gimp_drawable_get (drawable_id); drawable = gimp_drawable_get (drawable_id);
new_layer = drawable; new_layer = drawable;
} }
@ -333,8 +334,17 @@ tile (gint32 image_id,
} }
} }
gimp_drawable_update (new_layer->drawable_id,
0, 0, new_layer->width, new_layer->height);
gimp_drawable_detach (drawable);
if (tvals.new_image)
{
gimp_drawable_detach (new_layer);
/* copy the colormap, if necessary */ /* copy the colormap, if necessary */
if (image_type == GIMP_INDEXED && tvals.new_image) if (image_type == GIMP_INDEXED)
{ {
gint ncols; gint ncols;
guchar *cmap; guchar *cmap;
@ -344,22 +354,13 @@ tile (gint32 image_id,
g_free (cmap); g_free (cmap);
} }
if (tvals.new_image)
{
gimp_image_undo_enable (new_image_id); gimp_image_undo_enable (new_image_id);
gimp_drawable_flush (new_layer);
gimp_drawable_detach (new_layer);
} }
else else
{ {
gimp_image_undo_group_end (image_id); gimp_image_undo_group_end (image_id);
} }
gimp_drawable_update (drawable->drawable_id,
0, 0,
drawable->width, drawable->height);
gimp_drawable_detach (drawable);
return new_image_id; return new_image_id;
} }