musescore/MuseScore — pull request #1558 by MarcSabatella (2014-12-20 01:03:43+00:00)
Title: fix #41846: incorrect transposition of C key signatures

Two sort of related bugs fixed by this. One has to do transposition of initial C major key signatures on toggling of Concert Pitch - this was being handled incorrectly, as shown in the initial bug report. The second has to do with mid-score changes to C being lost completely upon toggling Concert Pitch, as shown in my comment #1.

As fragile as this code has been, I of course welcome review.