mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 12:32:37 +00:00
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:
parent
4625597ab8
commit
a956d53689
|
@ -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>
|
||||
|
||||
* app/core/gimpimagemap.c (gimp_image_map_clear)
|
||||
|
|
|
@ -1095,7 +1095,7 @@ load_rgba (TIFF *tif,
|
|||
0, 0, imageWidth, imageLength, TRUE, FALSE);
|
||||
|
||||
buffer = g_new (uint32, imageWidth * imageLength);
|
||||
channel[0].pixels = (guchar*) buffer;
|
||||
channel[0].pixels = (guchar *) buffer;
|
||||
|
||||
if (!TIFFReadRGBAImage (tif, imageWidth, imageLength, buffer, 0))
|
||||
g_message ("Unsupported layout, no RGBA loader");
|
||||
|
|
|
@ -262,6 +262,7 @@ tile (gint32 image_id,
|
|||
new_image_id = gimp_image_new (tvals.new_width, tvals.new_height,
|
||||
image_type);
|
||||
gimp_image_undo_disable (new_image_id);
|
||||
|
||||
*layer_id = gimp_layer_new (new_image_id, _("Background"),
|
||||
tvals.new_width, tvals.new_height,
|
||||
gimp_drawable_type (drawable_id),
|
||||
|
@ -273,7 +274,7 @@ tile (gint32 image_id,
|
|||
gimp_image_add_layer (new_image_id, *layer_id, 0);
|
||||
new_layer = gimp_drawable_get (*layer_id);
|
||||
|
||||
/* Get the specified drawable */
|
||||
/* Get the source drawable */
|
||||
drawable = gimp_drawable_get (drawable_id);
|
||||
}
|
||||
else
|
||||
|
@ -289,7 +290,7 @@ tile (gint32 image_id,
|
|||
tvals.new_width, tvals.new_height,
|
||||
0, 0);
|
||||
|
||||
/* Get the specified drawable */
|
||||
/* Get the source drawable */
|
||||
drawable = gimp_drawable_get (drawable_id);
|
||||
new_layer = drawable;
|
||||
}
|
||||
|
@ -333,33 +334,33 @@ tile (gint32 image_id,
|
|||
}
|
||||
}
|
||||
|
||||
/* copy the colormap, if necessary */
|
||||
if (image_type == GIMP_INDEXED && tvals.new_image)
|
||||
{
|
||||
gint ncols;
|
||||
guchar *cmap;
|
||||
gimp_drawable_update (new_layer->drawable_id,
|
||||
0, 0, new_layer->width, new_layer->height);
|
||||
|
||||
cmap = gimp_image_get_colormap (image_id, &ncols);
|
||||
gimp_image_set_colormap (new_image_id, cmap, ncols);
|
||||
g_free (cmap);
|
||||
}
|
||||
gimp_drawable_detach (drawable);
|
||||
|
||||
if (tvals.new_image)
|
||||
{
|
||||
gimp_image_undo_enable (new_image_id);
|
||||
gimp_drawable_flush (new_layer);
|
||||
gimp_drawable_detach (new_layer);
|
||||
|
||||
/* copy the colormap, if necessary */
|
||||
if (image_type == GIMP_INDEXED)
|
||||
{
|
||||
gint ncols;
|
||||
guchar *cmap;
|
||||
|
||||
cmap = gimp_image_get_colormap (image_id, &ncols);
|
||||
gimp_image_set_colormap (new_image_id, cmap, ncols);
|
||||
g_free (cmap);
|
||||
}
|
||||
|
||||
gimp_image_undo_enable (new_image_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue