Undo does not restore replaced accidentals

• Jan 20, 2015 - 14:24
Type
Functional
Severity
S4 - Minor
Status
closed
Project

1. Open attached score (produced in 1.3).
2. Click on notehead.
3. Click ♮.
4. 'Edit'>'Undo'.

Expected result: Flat is restored.
Actual result: There are no accidentals visually, but the note sounds C♭.

Note: It is also reproducible in a 2.0 score.

Using MuseScore 2.0 Nightly Build 4516685 - Mac 10.7.5.


Comments

Since the playback is now out of sync with the notated pitch, I'd consider this more than minor. Although it does fix itself on save/reload, even just if you do more note entry in that measure.

The accidentals in the rest of the measure are off too.

I thought at first it would be just a matter of adding a called to cmdUpdateAccidentals to the function that handles the undo of the accidental change. But it seems there is single function for this. The changeAccidental() function itself places all the specific things it does on the undo stack, but there is no undo command specifically for the changeAccidental itself. So there is no place I can find to stick a call to cmdUpdateNotes().

I guess the fix is probably to add a new undo command for this. But I'm not very confident about that whole process.