gimp r27060 - in trunk: . app/display



Author: mitch
Date: Thu Sep 25 16:59:02 2008
New Revision: 27060
URL: http://svn.gnome.org/viewvc/gimp?rev=27060&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/app/display/gimpdisplayshell-dnd.c

Modified: trunk/app/display/gimpdisplayshell-dnd.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-dnd.c	(original)
+++ trunk/app/display/gimpdisplayshell-dnd.c	Thu Sep 25 16:59:02 2008
@@ -641,21 +641,7 @@
                                    _("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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]