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
Merge pull request #1503 from badosu/master

Fix PianoRoll changing editMode outside window