2008/8/9 Han-Wen Nienhuys <[EMAIL PROTECTED]>:
> This does not make sense to me at all. line-positions is a property
> of the staff symbol, as is line-count. If someone is calling
>
> Staff_symbol::on_line(x, y)
>
> where x is not in fact the staff-symbol, then that is an error in the caller.
It's only called indirectly through Staff_symbol_referencer::on_line ().
Before the patch was applied, Staff_symbol_referencer::on_line ()
looked like this:
bool
Staff_symbol_referencer::on_line (Grob *me, int pos)
{
int sz = line_count (me) - 1;
return ((pos + sz) % 2) == 0;
}
Though it's called by objects which aren't staff-symbol,
Staff_symbol_referencer::line_count () made sure it retrieved the
staff-symbol, if present:
int
Staff_symbol_referencer::line_count (Grob *me)
{
Grob *st = get_staff_symbol (me);
return st ? Staff_symbol::line_count (st) : 0;
}
Regards,
Neil
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user