gimp/plug-ins
Michael Natterer dc3ac41965 add the layer to the image before pasting to it. Fixes bug #132504.
2004-01-26  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/scripts/unsharp-mask.scm: add the layer to
	the image before pasting to it. Fixes bug #132504.

	Fixed the underlying problem: make it impossible to attach
	floating selections to drawables which are not currently part of
	the image's layer or channel stacks.
	Also cleaned up image <-> floating_sel interaction:

	* app/core/gimplayer-floating-sel.[ch] (floating_sel_attach):
	added assertion that the drawable is part of the image (see below).
	Don't call gimp_image_floating_selection_changed(), it's emitted
	by gimp_image_add_layer() now.

	(floating_sel_remove)
	(floating_sel_anchor): don't emit "floating_selection_changed",
	it's emitted by gimp_image_remove_layer() now.

	(floating_sel_anchor): removed the fix for bug #132162 because
	gimp_image_remove_layer() behaves correctly now (see below).

	Renamed floating_sel_reset() to floating_sel_activate_drawable().
	Added g_return_if_fail() all over the place.

	* app/core/gimpimage.[ch]: added new function gimp_image_owns_item()
	which return TRUE if the passed item is part of the image.

	(gimp_image_add_layer): emit "floating_selection_changed" here if
	needed.

	(gimp_image_remove_layer): emit "floating_selection_changed" if
	needed, don't try to activate a layer if we called
	floating_sel_activate_drawable().
	This is the real fix for bug #132162.

	* app/core/gimpimage-undo-push.c (undo_pop_layer): apply the same
	fixes as to gimp_image_add,remove_layer(). Don't call
	gimp_drawable_invalidate_preview() on the previously active layer
	because that's done by gimp_image_set_active_layer() now.

	* app/xcf/xcf-load.c: remember the "floating_sel_drawable" in the
	XcfInfo struct and attach it *after* all layers and channels are
	loaded to avoid attaching the floating selection to an
	out-of-image drawable.

	* app/core/gimp-edit.c (gimp_edit_paste)
	* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine,
	gimp_drawable_transform_flip, gimp_drawable_transform_rotate)
	* app/core/gimpselection.c (gimp_selection_float)
	* app/text/gimptext-compat.c (text_render): added checks for
	gimp_image_owns_item() in all functions which can produce
	floating selections.

	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: added checks for
	gimp_item_owns_image() and return an execution error if invoked
	with a drawable which is not part of the image.

	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2004-01-26 15:34:47 +00:00
..
bmp modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
common use GSpawn instead of popen, -dBATCH, fixes #108659 for this plugin. 2004-01-25 23:46:24 +00:00
dbbrowser modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
faxg3 modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
fits modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
flame modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
fp modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
FractalExplorer configure.in renamed obnoxiously long fractalexplorer-examples directory 2004-01-22 04:09:12 +00:00
gfig modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
gflare modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
gfli modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
gimp_ace pulled new sources from gle (containing a fix for kelly's justify==FILL 2000-02-07 04:10:09 +00:00
gimpressionist modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
helpbrowser modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
ifscompose modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
imagemap modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
jpeg added help IDs for the libgimp export and unit dialogs. 2004-01-20 17:10:16 +00:00
libgimpoldpreview Don't call gimp_plug_in_get_path(), since it doesn't really help, call 2003-12-13 23:58:33 +00:00
Lighting modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
MapObject modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
maze modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
pagecurl modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
print modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
pygimp modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
rcm modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
script-fu add the layer to the image before pasting to it. Fixes bug #132504. 2004-01-26 15:34:47 +00:00
sel2path modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
sgi modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
twain modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
uri plug-ins/common/mail.c use more already translated standard file error 2004-01-20 11:24:14 +00:00
winsnap modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
xjt modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
.cvsignore shut up CVS 2000-08-26 12:52:38 +00:00
Makefile.am plug-ins/Lighting/Makefile.am plug-ins/Lighting/lighting_apply.c 2003-12-14 17:17:56 +00:00
makefile.msc plug-ins/Lighting/Makefile.am plug-ins/Lighting/lighting_apply.c 2003-12-14 17:17:56 +00:00