added gimp_item_translate() and virtual function GimpItem::translate().

2003-05-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added gimp_item_translate() and
	virtual function GimpItem::translate().

	* app/core/gimplayer.[ch]: removed public function
	gimp_layer_translate() and implement GimpItem::translate()
	instead.

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]: changed layer_displace undo
	types and functions to be item_displace ones.

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-resize.c
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/layers-commands.c
	* app/tools/gimpeditselectiontool.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/layer.pdb: changed accordingly.

	* app/pdb/layer_cmds.c: regenerated.
This commit is contained in:
Michael Natterer
2003-05-08 19:11:17 +00:00
committed by Michael Natterer
parent ab0ac8472f
commit 129c78d271
17 changed files with 203 additions and 150 deletions

View File

@ -67,7 +67,7 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
off_x = (gdisp->gimage->width - gimp_item_width (GIMP_ITEM (drawable))) / 2;
off_y = (gdisp->gimage->height - gimp_item_height (GIMP_ITEM (drawable))) / 2;
gimp_layer_translate (new_layer, off_x, off_y, FALSE);
gimp_item_translate (GIMP_ITEM (new_layer), off_x, off_y, FALSE);
gimp_image_add_layer (gdisp->gimage, new_layer, -1);