summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Gey <denemo@nilsgey.de>2011-02-14 01:41:39 +0100
committerNils Gey <denemo@nilsgey.de>2011-02-14 01:41:39 +0100
commit58c5dbe2b706e1b7473b3bc19c2a246bc40b9b37 (patch)
tree0978b57617641b77a99b23d6afe0242b99f973ae
parent4dcf77b06a8b5458b040bb698df2c9bdf8e32ce1 (diff)
Small performance tweak to selection::MoveToStaffBeginning
-rw-r--r--actions/denemo.scm15
1 files changed, 6 insertions, 9 deletions
diff --git a/actions/denemo.scm b/actions/denemo.scm
index ee041bc2..51e8fa9e 100644
--- a/actions/denemo.scm
+++ b/actions/denemo.scm
@@ -168,20 +168,17 @@
(define (selection::MoveToStaffBeginning)
-(d-PushPosition)
- (if (d-GoToSelectionStart) ; Test if there is a selection at all
+ (if (d-MarkStatus)
(begin
- (d-PopPosition); return to the initial position to go to the correct staff
(d-PushPosition); save it again in case that there is no selection in this staff.
(d-MoveToBeginning)
(let loop () ; Real work begins here. Loop through until you found it or end of staff.
(if (d-IsInSelection)
- #t ; found the first note
- (if (d-NextObject) (loop) ; prevent endless loop if reaching the end of a staff without selection present
- (begin (d-PopPosition) #f )))) ; if end of staff and no selection return to initial position and return #f
- )
- (begin (d-PopPosition) #f ) ; no selection at all.
- )) ; fi GoToSelectionStart
+ #t ; found a selection. stop.
+ (if (d-NextObject)
+ (loop) ; prevent endless loop if reaching the end of a staff without selection present
+ (begin (d-PopPosition) #f )))) ) ; if end of staff and no selection return to initial position and return #f
+ #f)) ; no selection at all.