summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Neeman <joeneeman@gmail.com>2007-07-14 12:06:47 +1000
committerJoe Neeman <joeneeman@gmail.com>2007-07-14 12:06:47 +1000
commitf523d7ffab6ba3ad80245084c9039e1c53aeaf44 (patch)
tree7890d8e9f103e9637e140df25972fc70b01bf274
parentf4d01d39bd08b206b237f9b2ace76976e02a957f (diff)
fix 390
-rw-r--r--input/regression/completion-heads-multiple-ties.ly18
-rw-r--r--lily/completion-note-heads-engraver.cc8
2 files changed, 21 insertions, 5 deletions
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.
*/