]> git.donarmstrong.com Git - lilypond.git/commitdiff
fix 390
authorJoe Neeman <joeneeman@gmail.com>
Sat, 14 Jul 2007 02:06:47 +0000 (12:06 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 14 Jul 2007 02:06:47 +0000 (12:06 +1000)
input/regression/completion-heads-multiple-ties.ly [new file with mode: 0644]
lily/completion-note-heads-engraver.cc

diff --git a/input/regression/completion-heads-multiple-ties.ly b/input/regression/completion-heads-multiple-ties.ly
new file mode 100644 (file)
index 0000000..84247cb
--- /dev/null
@@ -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
+}
index 0153ba6b4babe2a6a02417819bc57e3aea16fac8..cbee0b2f5d3b8c88dc00ce45ae31fd6b0f23a2bc 100644 (file)
@@ -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.
   */