use the new helper function here too.

2008-09-25  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_pixbuf): use the new helper function here
	too.


svn path=/trunk/; revision=27060
This commit is contained in:
Michael Natterer 2008-09-25 16:59:02 +00:00 committed by Michael Natterer
parent 518c8f9a72
commit 4a91523321
2 changed files with 7 additions and 15 deletions

View file

@ -1,3 +1,9 @@
2008-09-25 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-dnd.c
(gimp_display_shell_drop_pixbuf): use the new helper function here
too.
2008-09-25 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-dnd.c

View file

@ -641,21 +641,7 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
_("Drop New Layer"));
if (! new_image)
{
gint x, y;
gint width, height;
gint off_x, off_y;
gimp_display_shell_untransform_viewport (shell,
&x, &y, &width, &height);
gimp_item_offsets (new_item, &off_x, &off_y);
off_x = x + (width - gimp_item_width (new_item)) / 2 - off_x;
off_y = y + (height - gimp_item_height (new_item)) / 2 - off_y;
gimp_item_translate (new_item, off_x, off_y, FALSE);
}
gimp_display_shell_dnd_position_item (shell, new_item);
gimp_image_add_layer (image, new_layer, -1);