Commit 4e9c58a5 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

copy the merged layer, not the first one. Preserve the type of the layer

2004-06-02  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_files): copy the merged layer, not the
	first one. Preserve the type of the layer to make e.g. dropping an
	XCF with a single text layer work.
parent 631b5b4d
2004-06-02 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-dnd.c
(gimp_display_shell_drop_files): copy the merged layer, not the
first one. Preserve the type of the layer to make e.g. dropping an
XCF with a single text layer work.
2004-06-02 Sven Neumann <sven@gimp.org>
* NEWS
......
......@@ -296,18 +296,23 @@ gimp_display_shell_drop_files (GtkWidget *widget,
gimp_image_undo_disable (new_image);
if (gimp_container_num_children (new_image->layers) > 1)
gimp_image_merge_visible_layers (new_image, context,
GIMP_CLIP_TO_IMAGE);
layer = (GimpLayer *)
gimp_container_get_child_by_index (new_image->layers, 0);
{
layer = gimp_image_merge_visible_layers (new_image, context,
GIMP_CLIP_TO_IMAGE);
}
else
{
layer = (GimpLayer *)
gimp_container_get_child_by_index (new_image->layers, 0);
}
if (layer)
{
GimpItem *new_item;
new_item = gimp_item_convert (GIMP_ITEM (layer), gimage,
GIMP_TYPE_LAYER, TRUE);
G_TYPE_FROM_INSTANCE (layer),
TRUE);
if (new_item)
{
......
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