[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: restarting staff destroys DynamicLineSpanner.staff-padding afte

From: Aaron Hill
Subject: Re: Bug: restarting staff destroys DynamicLineSpanner.staff-padding after line break
Date: Thu, 07 Mar 2019 00:13:30 -0800
User-agent: Roundcube Webmail/1.3.8

On 2019-03-06 4:55 pm, Trevor Bača wrote:

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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]