replace the layer in the global item hash table, fixes bug #116936.

2003-07-08  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayer.c (gimp_text_layer_from_layer): replace
	the layer in the global item hash table, fixes bug #116936.

	* libgimp/gimpexport.c (gimp_export_image): added a warning that
	would have helped to resolve above bug.
This commit is contained in:
Sven Neumann 2003-07-08 11:44:12 +00:00 committed by Sven Neumann
parent 616a367bc8
commit 2783068087
3 changed files with 28 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2003-07-08 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayer.c (gimp_text_layer_from_layer): replace
the layer in the global item hash table, fixes bug #116936.
* libgimp/gimpexport.c (gimp_export_image): added a warning that
would have helped to resolve above bug.
2003-07-08 Sven Neumann <sven@gimp.org>
* app/gui/splash.c (splash_create): don't ignore the delete event

View File

@ -34,6 +34,7 @@
#include "config/gimpconfig.h"
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "gimptext.h"
@ -292,6 +293,11 @@ gimp_text_layer_from_layer (GimpLayer *layer,
item->tattoo = gimp_item_get_tattoo (GIMP_ITEM (layer));
item->gimage = gimp_item_get_image (GIMP_ITEM (layer));
gimp_item_set_image (GIMP_ITEM (layer), NULL);
g_hash_table_replace (item->gimage->gimp->item_table,
GINT_TO_POINTER (item->ID),
item);
item->parasites = GIMP_ITEM (layer)->parasites;
GIMP_ITEM (layer)->parasites = NULL;

View File

@ -606,17 +606,22 @@ gimp_export_image (gint32 *image_ID,
&& !(capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS))
{
if (gimp_drawable_is_layer_mask (*drawable_ID))
dialog_return =
confirm_save_dialog (_("You are about to save a layer mask as %s.\n"
"This will not save the visible layers."),
format_name);
{
dialog_return = confirm_save_dialog
(_("You are about to save a layer mask as %s.\n"
"This will not save the visible layers."), format_name);
}
else if (gimp_drawable_is_channel (*drawable_ID))
dialog_return =
confirm_save_dialog (_("You are about to save a channel (saved selection) as %s.\n"
"This will not save the visible layers."),
format_name);
{
dialog_return = confirm_save_dialog
(_("You are about to save a channel (saved selection) as %s.\n"
"This will not save the visible layers."), format_name);
}
else
; /* this should not happen */
{
/* this should not happen */
g_warning ("gimp_export_image: unknown drawable type!");
}
/* cancel - the user can then select an appropriate layer to save */
if (dialog_return == GIMP_EXPORT_CANCEL)