From 2e1bfb47a5a1f2f69f8dd7f0c0ee25c64e92feaa Mon Sep 17 00:00:00 2001 From: Amadeus Folego Date: Fri, 26 Dec 2014 07:14:27 -0200 Subject: [PATCH] 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 --- src/gui/PianoRoll.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 4e37b752a..b2007b613 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -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;