]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/completion-note-heads-engraver.cc
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond into lilypond...
[lilypond.git] / lily / completion-note-heads-engraver.cc
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.
   */