From: David Kastrup Date: Thu, 25 Sep 2014 10:43:53 +0000 (+0200) Subject: Issue 4130: Isolated durations don't work after \pageBreak X-Git-Tag: release/2.19.16-1~31 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dd5a6e77a6be7d8f2210b83d593c73bfbfafab86;p=lilypond.git Issue 4130: Isolated durations don't work after \pageBreak 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. --- diff --git a/scm/music-functions.scm b/scm/music-functions.scm index ea174a6a69..aad473c7f0 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -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)