applied patch from Dave Neary that changes the behavior from undo

2004-07-12  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/scripts/round-corners.scm: applied patch from
	Dave Neary that changes the behavior from undo disable/enable to
	using an undo group if the script doesn't work on a copy of the
	image. Fixes bug #146344.
This commit is contained in:
Michael Natterer 2004-07-12 16:14:22 +00:00 committed by Michael Natterer
parent 5e25cdd239
commit bfed40e9da
2 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2004-07-12 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/round-corners.scm: applied patch from
Dave Neary that changes the behavior from undo disable/enable to
using an undo group if the script doesn't work on a copy of the
image. Fixes bug #146344.
2004-07-12 Michael Natterer <mitch@gimp.org>
* menus/toolbox-menu.xml.in: applied patch from Brion Vibber

View File

@ -59,7 +59,10 @@
img)))
(pic-layer (car (gimp-image-get-active-drawable image))))
(gimp-image-undo-disable image)
(cond ((= work-on-copy TRUE)
(gimp-image-undo-disable image))
((= work-on-copy FALSE)
(gimp-image-undo-group-start image)))
; add an alpha channel to the image
(gimp-layer-add-alpha pic-layer)
@ -109,7 +112,11 @@
(gimp-image-lower-layer image bg-layer))))
; clean up after the script
(gimp-image-undo-enable image)
(cond ((= work-on-copy TRUE)
(gimp-image-undo-enable image))
((= work-on-copy FALSE)
(gimp-image-undo-group-end image)))
(if (= work-on-copy TRUE)
(gimp-display-new image))
(gimp-displays-flush)))