X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flyric-engraver.cc;h=cdee61517e333f4c6a554c973b27c11555d8835c;hb=7cffbd132be3e32b4de2211873a1aea34d0b542c;hp=58b8f6cdd294e7a6a17907d75c8e4e9418d3c542;hpb=0c14539bc83d6bb405141b6f21430b33d1e8fcf0;p=lilypond.git diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 58b8f6cdd2..cdee61517e 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -96,7 +96,10 @@ get_voice_to_lyrics (Context *lyrics) SCM avc = lyrics->get_property ("associatedVoiceContext"); if (Context *c = unsmob (avc)) - return c; + { + if (!c->is_removable ()) + return c; + } SCM voice_name = lyrics->get_property ("associatedVoice"); string nm = lyrics->id_string (); @@ -116,26 +119,11 @@ get_voice_to_lyrics (Context *lyrics) if (!scm_is_symbol (voice_type)) return 0; - Context *parent = lyrics; - Context *voice = 0; - while (parent && !voice) - { - voice = find_context_below (parent, voice_type, nm); - parent = parent->get_parent_context (); - } - + Context *voice = find_context_near (lyrics, voice_type, nm); if (voice) return voice; - parent = lyrics; - voice = 0; - while (parent && !voice) - { - voice = find_context_below (parent, voice_type, ""); - parent = parent->get_parent_context (); - } - - return voice; + return find_context_near (lyrics, voice_type, ""); } Grob * @@ -170,7 +158,7 @@ get_current_note_head (Context *voice) // here. Not with this mechanism. if ((*end_mom == end_from_now) && dynamic_cast (g) - && Note_head::has_interface (g)) + && has_interface (g)) { return g; }