From: Joe Neeman Date: Sat, 14 Jul 2007 02:06:47 +0000 (+1000) Subject: fix 390 X-Git-Tag: release/2.11.28-1~14^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f523d7ffab6ba3ad80245084c9039e1c53aeaf44;p=lilypond.git fix 390 --- 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. */