handle drops on the empty image window.
2008-09-04 Sven Neumann <sven@gimp.org> * app/display/gimpdisplayshell-dnd.c (gimp_display_shell_drop_drawable) (gimp_display_shell_drop_pixbuf): handle drops on the empty image window. svn path=/trunk/; revision=26864
This commit is contained in:

committed by
Sven Neumann

parent
67f4c36213
commit
05e7e9dc54
@ -187,7 +187,14 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
|
||||
return;
|
||||
|
||||
if (! image)
|
||||
return;
|
||||
{
|
||||
image = gimp_image_new (shell->display->gimp,
|
||||
gimp_item_width (GIMP_ITEM (viewable)),
|
||||
gimp_item_height (GIMP_ITEM (viewable)),
|
||||
GIMP_RGB);
|
||||
|
||||
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0);
|
||||
}
|
||||
|
||||
if (GIMP_IS_LAYER (viewable))
|
||||
new_type = G_TYPE_FROM_INSTANCE (viewable);
|
||||
@ -560,7 +567,14 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
|
||||
return;
|
||||
|
||||
if (! image)
|
||||
return;
|
||||
{
|
||||
image = gimp_image_new (shell->display->gimp,
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf),
|
||||
GIMP_RGB);
|
||||
|
||||
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0);
|
||||
}
|
||||
|
||||
new_layer =
|
||||
gimp_layer_new_from_pixbuf (pixbuf, image,
|
||||
|
Reference in New Issue
Block a user