Given a number of staves in a staff group in a flowable, if the staves have different key signatures that are not declared at the same point, the calculated flowable margin can be incorrect. This is because flowable margin calculation uses a system of margin layers where each key signature in the flowable resets the key signature margin layer to its width. If multiple key signatures are declared at the same x location, this is not a problem because the margin calculation uses the largest margin value provided in such cases. But if the key signatures are declared at different points the value is overwritten.
A similar problem likely exists for other objects which declare variable flowable margins - like if a percussion clef is added after pitched clefs are - but I believe this is the most common case.
from neoscore.common import *
neoscore.setup()
flowable = Flowable(ORIGIN, None, Mm(1000), Mm(35))
staff_group = StaffGroup()
staff_1 = Staff((Mm(0), Mm(0)), flowable, Mm(1000), staff_group)
staff_2 = Staff((Mm(0), Mm(15)), flowable, Mm(1000), staff_group)
Clef(Mm(0), staff_1, "treble")
Clef(Mm(0), staff_2, "bass")
KeySignature(ZERO, staff_1, "af_major")
KeySignature(Mm(250), staff_2, "f_major")
neoscore.show()

Fixing this is likely to be pretty involved, and I think this is probably a fairly narrow use-case, so leaving this as a tracking issue for now.
Given a number of staves in a staff group in a flowable, if the staves have different key signatures that are not declared at the same point, the calculated flowable margin can be incorrect. This is because flowable margin calculation uses a system of margin layers where each key signature in the flowable resets the key signature margin layer to its width. If multiple key signatures are declared at the same x location, this is not a problem because the margin calculation uses the largest margin value provided in such cases. But if the key signatures are declared at different points the value is overwritten.
A similar problem likely exists for other objects which declare variable flowable margins - like if a percussion clef is added after pitched clefs are - but I believe this is the most common case.
Fixing this is likely to be pretty involved, and I think this is probably a fairly narrow use-case, so leaving this as a tracking issue for now.