X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flyric-engraver.cc;h=fadb35d6b4c8dd3d10e7a541b5bdabc80da2d1b7;hb=43c2a7d76764f0e9c7a8f09067af885c53b018dc;hp=58b8f6cdd294e7a6a17907d75c8e4e9418d3c542;hpb=958e95822083954cad00e0a598eb9f12ceba67b9;p=lilypond.git diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 58b8f6cdd2..fadb35d6b4 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -116,26 +116,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 *