]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #237
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 Jan 2007 11:43:15 +0000 (12:43 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 Jan 2007 14:02:19 +0000 (15:02 +0100)
Don't look at note_head->get_column() to determine whether a note head
is interesting.  Rather, take any notehead that ends after the current
moment.

lily/lyric-engraver.cc

index 06ffce0d50ad4cc354015a88e4e623beb2d1da53..4fbcf5d60c8d812617911f14a3cfb3284b8df3be 100644 (file)
@@ -115,12 +115,20 @@ get_voice_to_lyrics (Context *lyrics)
 Grob *
 get_current_note_head (Context *voice)
 {
+  Moment now = voice->now_mom ();
   for (SCM s = voice->get_property ("busyGrobs");
        scm_is_pair (s); s = scm_cdr (s))
     {
-      Item *g = dynamic_cast<Item *> (unsmob_grob (scm_cdar (s)));
-
-      if (g && !g->get_column ()
+      Grob *g = unsmob_grob (scm_cdar (s));;
+      Moment *end_mom = unsmob_moment (scm_caar (s));
+      if (!end_mom || !g)
+       {
+         programming_error ("busyGrobs invalid");
+         continue;
+       }
+      
+      if (end_mom->main_part_ > now.main_part_
+         && dynamic_cast<Item *> (g)
          && Note_head::has_interface (g))
        return g;
     }