]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4130: Isolated durations don't work after \pageBreak
authorDavid Kastrup <dak@gnu.org>
Thu, 25 Sep 2014 10:43:53 +0000 (12:43 +0200)
committerDavid Kastrup <dak@gnu.org>
Thu, 2 Oct 2014 10:25:51 +0000 (12:25 +0200)
The example
\score {
  \new RhythmicStaff {
    R1 |
    \pageBreak
    1~ |
    8 r r4 r2 |
  }
}

led to unexpected results since \pageBreak produces an EventChord which
is then taken as a repeat note by 1~.  This patch makes sure that
repeated durations only attach to event chords containing rhythmic
events.

scm/music-functions.scm

index ea174a6a69cbed76248a2fccdb0b1444ccef5348..aad473c7f0cf126684c6e5a893fbdc39dea04b18 100644 (file)
@@ -825,7 +825,10 @@ from the predecessor note/chord if available."
          m)
        (cond
         ((music-is-of-type? m 'event-chord)
-         (set-and-ret m))
+         (if (any (lambda (m) (music-is-of-type? m 'rhythmic-event))
+                  (ly:music-property m 'elements))
+             (set! last-pitch m))
+         m)
         ((music-is-of-type? m 'note-event)
          (cond
           ((or (ly:music-property m 'pitch #f)