From dd5a6e77a6be7d8f2210b83d593c73bfbfafab86 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 25 Sep 2014 12:43:53 +0200 Subject: [PATCH] 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. --- scm/music-functions.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.39.2