Layout jump due to bad cautionaryWidth() calculation
Windows 10, GIT commit: c90a7e0
This is a followup to #109021: Hairpin and other symbols are shifting when relayout occurs. As I imagined, there *are* other cases where you can get the same sort of layout shift on first relayout after load, with presumably the same "wandering hairpin" type of side effects. The problem with the score in that issue was with widths of repeat barlines. But there is also a problem with double bars generated as part of a courtesy key signature. You can see it with the attached score:
1) Load, verify measure 3 is at end of first system
2) press Ctrl+A
Result: measure 3 jumps to the next system
This happens because our estimate of the width of the courtesy key signature that would be needed in order to fit measure 3 at the end of the first system does not account for the double bar that also gets added. It shouldn't be too hard to add this to cautionaryWidth(). We just need to do a similar thing as we do for the key signature itself - check across all staves to make sure there isn't one already, then keep a running "max" value to figure out the widest the generated barline would end up being.