From f523d7ffab6ba3ad80245084c9039e1c53aeaf44 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Sat, 14 Jul 2007 12:06:47 +1000 Subject: [PATCH] fix 390 --- .../completion-heads-multiple-ties.ly | 18 ++++++++++++++++++ lily/completion-note-heads-engraver.cc | 8 +++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 input/regression/completion-heads-multiple-ties.ly diff --git a/input/regression/completion-heads-multiple-ties.ly b/input/regression/completion-heads-multiple-ties.ly new file mode 100644 index 0000000000..84247cb3d6 --- /dev/null +++ b/input/regression/completion-heads-multiple-ties.ly @@ -0,0 +1,18 @@ +\version "2.10.0" + +\header{ +texidoc=" +The @code{Completion_heads_engraver} correctly handles notes that need to be split into more than 2 parts. +" +} + +\layout { ragged-right= ##t } + + +\new Voice \with { + \remove "Note_heads_engraver" + \consists "Completion_heads_engraver" +} \relative c'{ + \time 2/4 + c4.. c4. c4. c2 c1 +} diff --git a/lily/completion-note-heads-engraver.cc b/lily/completion-note-heads-engraver.cc index 0153ba6b4b..cbee0b2f5d 100644 --- a/lily/completion-note-heads-engraver.cc +++ b/lily/completion-note-heads-engraver.cc @@ -148,11 +148,7 @@ Completion_heads_engraver::process_music () { note_dur = Duration (nb.main_part_, false); - Moment next = now; - next.main_part_ += note_dur.get_length (); - - get_global_context ()->add_moment_to_process (next); - do_nothing_until_ = next.main_part_; + do_nothing_until_ = now.main_part_ + note_dur.get_length (); } if (orig) @@ -192,6 +188,8 @@ Completion_heads_engraver::process_music () left_to_do_ -= note_dur.get_length (); + if (left_to_do_) + get_global_context ()->add_moment_to_process (now.main_part_ + left_to_do_); /* don't do complicated arithmetic with grace notes. */ -- 2.39.2