gimp r25276 - in trunk: . plug-ins/script-fu/scripts
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25276 - in trunk: . plug-ins/script-fu/scripts
- Date: Fri, 28 Mar 2008 14:01:39 +0000 (GMT)
Author: mitch
Date: Fri Mar 28 14:01:38 2008
New Revision: 25276
URL: http://svn.gnome.org/viewvc/gimp?rev=25276&view=rev
Log:
2008-03-28 Michael Natterer <mitch gimp org>
* plug-ins/script-fu/scripts/line-nova.scm (script-fu-line-nova):
move the call to gimp-selection-save inside the undo group.
(script-fu-register): use "*" as image type (not "") so the menu
item is disabled when there is no image.
Modified:
trunk/ChangeLog
trunk/plug-ins/script-fu/scripts/line-nova.scm
Modified: trunk/plug-ins/script-fu/scripts/line-nova.scm
==============================================================================
--- trunk/plug-ins/script-fu/scripts/line-nova.scm (original)
+++ trunk/plug-ins/script-fu/scripts/line-nova.scm Fri Mar 28 14:01:38 2008
@@ -19,12 +19,7 @@
(drw-width (car (gimp-drawable-width drw)))
(drw-height (car (gimp-drawable-height drw)))
(drw-offsets (gimp-drawable-offsets drw))
- (old-selection
- (if (eq? (car (gimp-selection-is-empty img)) TRUE)
- #f
- (car (gimp-selection-save img))
- )
- )
+ (old-selection FALSE)
(radius (max drw-height drw-width))
(index 0)
(dir-deg/line (/ 360 num-of-lines))
@@ -75,6 +70,14 @@
)
(gimp-image-undo-group-start img)
+
+ (set! old-selection
+ (if (eq? (car (gimp-selection-is-empty img)) TRUE)
+ #f
+ (car (gimp-selection-save img))
+ )
+ )
+
(gimp-selection-none img)
(srand (realtime))
(while (< index num-of-lines)
@@ -85,6 +88,7 @@
(set! index (+ index 1))
)
(gimp-edit-bucket-fill drw FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
+
(if old-selection
(begin
(gimp-selection-load old-selection)
@@ -93,6 +97,7 @@
(gimp-image-remove-channel img old-selection)
)
)
+
(gimp-image-undo-group-end img)
(gimp-displays-flush)
)
@@ -104,7 +109,7 @@
"Shuji Narazaki <narazaki gimp org>"
"Shuji Narazaki"
"1997,1998"
- ""
+ "*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Number of lines" '(200 40 1000 1 1 0 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]