Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes to various aspects of stafftype #4935
This started as what I thought would be a simple fix for an issue with scaling of chord symbols when making a staff small - but it turned out to open a can of worms. I saw that we were calling spatiumChanged() upon setting the "scale" property but not for "small", and that furthermore, we were doing this globally and thus not just for the staff in question or taking staff type changes into account. So I put the mostly-unused localSpatiumChanged functions to work, updating elements only for the staff and tick range affected. And along the way, needed to revamp how stafftype changes get added and removed, as neither delete nor undo were doing what they should.
Here is the list of issues fixed:
I left TODO notes in the code regarding how we manage the stafftype changes on undo/redo. What I have works a lot better than what we have now, but it does mean we throw away the properties associated with the stafftype change on delete. Undo brings the stafftype change back, but with a fresh set of properties as if it were newly added. There would be ways around this if we created a copy constructor and/or assignment operator for stafftype, but as it is, there is no way to remove the stafftype from the list on delete and then still have it be valid on undo.
Shouldn't the default copy constructor and assignment operator work well for