diff --git a/ChangeLog b/ChangeLog index d713cbaaca..f35ed76d13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-06-02 Michael Natterer + + * 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 * NEWS diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c index 423e89168d..e68705b046 100644 --- a/app/display/gimpdisplayshell-dnd.c +++ b/app/display/gimpdisplayshell-dnd.c @@ -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) {