X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-symbol-referencer.cc;h=9fbe6f8b4387c9f8838f4bcea2006447d9d9bd54;hb=286b81accdca4a86239425de564014a145109a6e;hp=e3070ff53d7373373b5505d095e4afef2b27e6e7;hpb=1493d37a97ec2e32c706d6706c476d22985a5682;p=lilypond.git diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index e3070ff53d..9fbe6f8b43 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -27,6 +27,10 @@ Staff_symbol_referencer::on_staffline (Grob *me) return on_staffline (me, (int) rint (get_position (me))); } +/* + This does not take size into account. + maybe rename: on_virtual_staffline, on_staff_or_ledger_line? + */ bool Staff_symbol_referencer::on_staffline (Grob *me, int pos) { @@ -76,7 +80,10 @@ Staff_symbol_referencer::get_position (Grob *me) p += 2.0 * y / Staff_symbol::staff_space (st); return p; } - + else if (!st) + { + return me->relative_coordinate (me->get_parent (Y_AXIS), Y_AXIS) * 2; + } return robust_scm2double (me->get_property ("staff-position"), p); }