Undo of Change Instrument does not work
Ubuntu 14.04, GIT commit: 699a5ee
1) my first score
2) add notes to measure 3
3) add Instrument text to measure 3
4) right click Instrument
5) Change Instrument
6) select Trombone
8) play notes to verify change
10) play notes to verify
Result: still sounds like trombone. Going to Change Instrument again, Trombone still shows as current instrument. A subsequent undo removes the Instrument text, so it's not just a matter of an extra item on undo stack. Nor does a save/reload fix it.
I discovered this working on #9352: Add ability to set transposition by range. I am trying to get the Change Instrument command to update the transposition for existing notes, and it's working fine except for the key signature, which requires me to have access to the old transposition. I'm trying to get the old transposition from the variable that supposedly stores the old instrument, but it is returning the new instrument instead. So whatever is going wrong with managing the undo is also interfering with my ability to get the transposition working correctly. I expect to fix this issue as part of my implementation for that. The undo command exists and is being executed, so hoepfully it's just a simple typo or something in the management of the original instrument.