Changes to scale of one staff can affect elements on other staves

• Apr 16, 2019 - 20:09
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Behavior here is somewhat different between 3.0.5 and master, and will probably be different still if/when my proposed fix for [#] is merged. But for now, easiest way to see an issue is add a staff text to one staff of a score, then go to a different staff, staff properties, and change the scaling to 200%. You'll see the staff text move further away from the staff it was attached to.

This happens because in in Staff:setProperty(), we are calling score()->spatiumChanged(), which causes all elements to recompute things as if the change applied to them. Luckily, this ends up being harmless for many elements as the things get recalculated anyhow on the layout. I still need to understand more about that.

Anyhow, there is function Staff::scaleChanged that is not currently used at all but could potentially do the right thing. That is the angle I will pursue.

Related issue: scaling doesn't happen right for the staff type change either, because it's either not calling spatiumChanged. So I plan to modify the scaleChanged to take a start and end tick.

BTW, I discovered this working on #287807: Chord symbols do not scale with staff size. It turns out chord symbols do scale on when changing staff scaling, but not on toggle "small", because we are calling spatiumChanged, so that's good. It was when I went to add a spatiumChanged() call on toggling small that I saw the potential for trouble.


Comments

Fix version
3.1.0