Commit cabb5e01 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

plug-ins/script-fu/scripts/guides-new-percent.scm don't use undo groups.

2005-04-17  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/scripts/guides-new-percent.scm
	* plug-ins/script-fu/scripts/guides-new.scm: don't use undo
	groups. It's useless for a single operation and it's wrong to use
	the undo group unconditionally, but add the guides conditionally.
parent 4e92a6cf
2005-04-17 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/guides-new-percent.scm
* plug-ins/script-fu/scripts/guides-new.scm: don't use undo
groups. It's useless for a single operation and it's wrong to use
the undo group unconditionally, but add the guides conditionally.
2005-04-16 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.c (gimp_context_real_set_brush)
......
......@@ -9,7 +9,6 @@
position)
(let* ((width (car (gimp-drawable-width drawable)))
(height (car (gimp-drawable-height drawable))))
(gimp-image-undo-group-start image)
(if (= direction 0)
(set! position (/ (* height position) 100))
......@@ -20,7 +19,6 @@
(if (< position height) (gimp-image-add-hguide image position))
(if (< position width) (gimp-image-add-vguide image position)))
(gimp-image-undo-group-end image)
(gimp-displays-flush)))
(script-fu-register "script-fu-guide-new-percent"
......
......@@ -10,14 +10,12 @@
position)
(let* ((width (car (gimp-drawable-width drawable)))
(height (car (gimp-drawable-height drawable))))
(gimp-image-undo-group-start image)
(if (= direction 0)
;; check position is inside the image boundaries
(if (< position height) (gimp-image-add-hguide image position))
(if (< position width) (gimp-image-add-vguide image position)))
(gimp-image-undo-group-end image)
(gimp-displays-flush)))
(script-fu-register "script-fu-guide-new"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment