From b7bda3ecd08b19f4b598f40ca8940e183083fd4f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 16 Jan 2007 12:43:15 +0100 Subject: [PATCH] Fix #237 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 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 02e0b09397..ae0464f97d 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -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 (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 (g) && Note_head::has_interface (g)) return g; } -- 2.39.5