[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Denemo-devel] [bug #28039] Delete Barline command
From: |
anonymous |
Subject: |
[Denemo-devel] [bug #28039] Delete Barline command |
Date: |
Wed, 25 Nov 2009 21:45:58 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 |
Follow-up Comment #3, bug #28039 (project denemo):
A minor problem with this new script is that it leaves the cursor at the
beginning of the new bar, rather than back where the cursor was when you
deleted the barline. I'm including a script that fixes this. I wasn't all
that familiar with the DirectivePut command so it might be sort of redundant
the way I did it. But it appears to work. Also, this script deletes an
object if you're not at the end of a bar. If this is not desirable, then just
move the final command, (d-DeleteObject), to just before the third-to-last
parenthesis, so that it's inside the begin statement, and it will only delete
a barline when it's on or right before one. -Dan W.
(let (( type (d-GetType) ))
(if (or (equal? type "Appending" ) (equal? type "None" ) ) ; if at the end
of bar...
(begin
(d-DirectivePut-standalone-display "Spot" "Spot") ;mark our spot, to
return
later.
(d-CursorLeft)
(d-SetMark) ;so we can copy and paste
(if (d-MeasureRight) ;; don't delete next bar if there isn't one
(begin
(d-MeasureLeft) ;; Now we're at the beginning of that
measure
(d-Cut)
(d-DeleteMeasure)
(d-Paste) )
(d-UnsetMark) ;this is to clear the mark if we set it, but
were at end of
staff
); if (d-MeasureRight)
;;;Modified Next BookmarkR by Nils Gey-get back to our spot.
(let gotoSpot ()
(if (and (not (d-DirectiveGet-standalone-display "Spot"))
(d-CursorRight)
)
(gotoSpot))
)
) ;begin
) ; if
) ;let
(d-DeleteObject) ;deletes "Spot" if we removed a barline, otherwise deletes
next object.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28039>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/