]> git.donarmstrong.com Git - lilypond.git/commitdiff
killCues should not remove music quoted with \quoteDuring, only \cueDuring!
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 29 Sep 2009 13:48:32 +0000 (15:48 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 30 Sep 2009 12:48:50 +0000 (14:48 +0200)
input/regression/quote-kill-cues.ly [new file with mode: 0644]
ly/music-functions-init.ly

diff --git a/input/regression/quote-kill-cues.ly b/input/regression/quote-kill-cues.ly
new file mode 100644 (file)
index 0000000..7954122
--- /dev/null
@@ -0,0 +1,18 @@
+\version "2.13.5"
+
+\header {
+  texidoc = "@code{\\killCues} shall only remove real cue notes generated by
+  @code{\\cueDuring}, but not other music quoted using @code{\\quoteDuring}."
+}
+
+mus = \relative c' { c2 c c c c c c c }
+\addQuote #"M" \mus
+
+q = \relative c' { 
+  d2 \quoteDuring #"M" { s1 } e2 \cueDuring #"M" #UP { s1 } f2
+}
+
+\score { <<
+  \q
+  \killCues \q
+>> }
index a57a17bc80f38dc7deccd283e12c78553f6ff099..2f1f5310368fe882f64a38f894f6ba798ce18a02 100644 (file)
@@ -322,7 +322,8 @@ killCues =
    (_i "Remove cue notes from @var{music}.")
    (music-map
     (lambda (mus)
-      (if (string? (ly:music-property mus 'quoted-music-name))
+      (if (and (string? (ly:music-property mus 'quoted-music-name))
+              (string=? (ly:music-property mus 'quoted-context-id) "cue"))
          (ly:music-property mus 'element)
          mus)) music))