MuseScore 09/07/2015: Message box

Yesterday I didn't code, but today I was quite productive. I was testing Undo action for MIDI mapping change and encountered some problems. Most of actions in Mixer are not undo-able: changing volume, pan, reverb, chorus, solo and mute. My Undo implementation synchronizes several instruments, so it is sensitive to changes of parameters of instruments. Since other actions in Mixer are not undo-able, user could get an unexpected behaviour by changing parameters and pressing Undo and Redo.

I was thinking about 2 possible solutions: 1) Abandon Undo for MIDI mapping sync. 2) Implement Undo for all controls in Mixer. I discussed this with Nicolas Froment (MuseScore CTO) and he gave me an idea to abandon Undo and just to show a warning message if there are instruments with the same MIDI mapping. I was so fixated on Undo and didn't think about so simple and nice idea.

I changed the behaviour: now when user tries to change MIDI mapping and there is an instrument with the same mapping, user gets a message box with warning and description of differences of instruments.