Undo of concert pitch produces incorrect transposition

• Nov 25, 2014 - 03:44
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Ubuntu 14.04, GIT commit: 0a59df0

1) new score for a Bb instrument, C major concert (transposed key is D)
2) enter a D in first measure
3) Concert Pitch - the D transposed to C and so does the key, as expected
4) Undo

Result: the key reverts to D, but the note stays C (displayed with an explicit accidental). Status line reports pitch as D.

This is not unique to the key of C, so it's not just the weirdness with how we handle C major key signatures causing this. Lots of other variations on this bug can be seen with other sequences of events. But the basic idea is that Undo of the Concert Pitch doesn't do its job correctly.

Borderline critical as it can leave score in an inconsistent state, potential for data loss. However, it does seem that it is a display-only anomaly. Things correct themselves on save/reload or if you press Concert Pitch again. Each note corrects itself if you, for example, use the arrow keys to change a pitch.

From what I can tell, the TPC1 and TPC2 are both correct. For some reason the line & accidental just aren't being updated.


Comments

This issue appeared between May 19 (Nightly, correct: fo31e87) and .... June 7 (wrong: fo31e87). I regret always to have thrown most nightlies in May and June :(

But I just looked quickly. I see this on May 21: https://github.com/musescore/MuseScore/commit/085492df900917117088aa1fd…
It remains a few days to check out!
June 2: https://github.com/musescore/MuseScore/commit/7eca27a6c800a512d888d52ee…

June 3: https://github.com/musescore/MuseScore/commit/b7dd5af49980a6de8e3621888…

June 5: https://github.com/musescore/MuseScore/commit/9a6d909a29d3c98f17f79b33c…
I stop here because the list is long ... And I saw possibly something else. The activity was apparently intense during this period on these issues.

After a run with "git bisect", I can confirm that the first commit in which this issue appeared is:
b7dd5af49

(Many thanks to cadiz1 for restricting the range over which the commit had to be searched for)

I can no no longer reproduce this with the original steps, but I can with somewhat different ones:

1) new score for Bb clarinent ley of C (concert; D transposed)
2) drag Eb (concert) key signature to second measure (displays as F)
3) enter F major scale in quarter notes starting in second measure
4) press Concert Pitch (changes to Eb major; note bad spelling of G# instead of Ab)
5) undo

Result: key signature returns to F, but notes stay in Eb (including the bad spelling of G#)

As before, pressing the Concert Pitch button fixes it.

I'll file the bug with the pitch spelling separately.