On 2019-03-06 4:55 pm, Trevor Bača wrote:
Hi,
Restarting the staff during the lifespan of a multisystem
DynamicLineSpanner destroys the value of DynamicLineSpanner properties
(like staff-padding) that were set when the DynamicLineSpanner was
created.
In the MWE below, the hairpin should exhibit staff-padding equal to 10
staff spaces below all four systems; but the value of staff-padding is
lost
at the point (in system 2) that the staff is restarted; we see evidence
of
this after the next line break (in systems 3 and 4) where no staff
padding
appears.
staff-padding is not destroyed. It is still set.
The issue is the broken spanners have lost their reference to the
StaffSymbol. And Side_position_interface::aligned_side
(side-position-interface.cc:180) expects that there is a valid
StaffSymbol in order to care about staff-padding.
Add the following \override to your code and note the output:
%%%%
\override DynamicLineSpanner.after-line-breaking = #(lambda (grob)
(display (format "~a ~a ~a\n"
(ly:grob-property grob 'staff-padding)
(ly:grob-property grob 'Y-offset)
(ly:grob-object grob 'staff-symbol))))
%%%%
Drawing systems...10 -12.05 #<Grob StaffSymbol >
10 -12.05 #<Grob StaffSymbol >
10 -4.57775475073964 #<undefined>
10 -5.45702919685039 #<undefined>
You can see that the staff-padding is still 10 for all of the spanners.
But only the first two that have a valid StaffSymbol end up with the
expected Y-offset.
-- Aaron Hill
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond