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
This commit is contained in:
Amadeus Folego
2014-12-26 07:14:27 -02:00
parent 9e4db1417a
commit 2e1bfb47a5

View File

@@ -1480,10 +1480,13 @@ void PianoRoll::keyPressEvent( QKeyEvent* event )
}
case Qt::Key_Control:
m_ctrlMode = m_editMode;
m_editMode = ModeSelect;
QApplication::changeOverrideCursor( Qt::ArrowCursor );
event->accept();
if ( isActiveWindow() )
{
m_ctrlMode = m_editMode;
m_editMode = ModeSelect;
QApplication::changeOverrideCursor( Qt::ArrowCursor );
event->accept();
}
break;
default:
break;