Fix PianoRoll changing editMode outside window

If an user Ctrl+Clicked on a track, e.g. copying/muting it, but the
focus was still on the PianoRoll window the mode would change

Fix #1501