X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-head-line-engraver.cc;h=a499905d623181e9d81573c1e99f701deb3165da;hb=f41cda4ec41e017c27a6e1d7893a7ce6fb87b1a8;hp=aaf1304d29b4a2660c7e653ff10de2576f74027a;hpb=f9214bac21e9926dc3248416f58190c98c4167a9;p=lilypond.git diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index aaf1304d29..a499905d62 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -54,20 +54,19 @@ void Note_head_line_engraver::acknowledge_rhythmic_head (Grob_info info) { head_ = info.grob (); - if (to_boolean (get_property ("followVoice"))) + Context *tr = context (); + + while (tr && !tr->is_alias (ly_symbol2scm ("Staff"))) + tr = tr->get_parent_context (); + + if (tr + && tr->is_alias (ly_symbol2scm ("Staff")) && tr != last_staff_ + && to_boolean (get_property ("followVoice"))) { - Context *tr = context (); - while (tr && !tr->is_alias (ly_symbol2scm ("Staff"))) - tr = tr->get_parent_context (); - - if (tr - && tr->is_alias (ly_symbol2scm ("Staff")) && tr != last_staff_) - { - if (last_head_) - follow_ = true; - last_staff_ = tr; - } + if (last_head_) + follow_ = true; } + last_staff_ = tr; } void @@ -103,8 +102,18 @@ Note_head_line_engraver::stop_translation_timestep () ADD_ACKNOWLEDGER (Note_head_line_engraver, rhythmic_head); ADD_TRANSLATOR (Note_head_line_engraver, - /* doc */ "Engrave a line between two note heads, for example a glissando. If " - " followVoice is set, staff switches also generate a line.", - /* create */ "Glissando VoiceFollower", - /* read */ "followVoice", - /* write */ ""); + /* doc */ + "Engrave a line between two note heads, for example a" + " glissando. If @code{followVoice} is set, staff switches" + " also generate a line.", + + /* create */ + "Glissando " + "VoiceFollower ", + + /* read */ + "followVoice ", + + /* write */ + "" + );