From 9db830b1c32f78c3d0b4a6460180ba48a47d027d Mon Sep 17 00:00:00 2001 From: Hussam Eddin Alhomsi Date: Sun, 20 Aug 2017 17:20:17 +0300 Subject: [PATCH] Restrict playing notes on the keyboard of the Piano Roll editor to left-clicks. This will restrict playing notes on the keyboard of the Piano Roll editor to left-clicks, so middle-clicking a key will not play its note. --- src/gui/editors/PianoRoll.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 9b65c684798..1a8ea2538ef 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -1670,10 +1670,10 @@ void PianoRoll::mousePressEvent(QMouseEvent * me ) // clicked on keyboard on the left if( me->buttons() == Qt::RightButton ) { - // right click, tone marker contextual menu + // right click - tone marker contextual menu m_semiToneMarkerMenu->popup( mapToGlobal( QPoint( me->x(), me->y() ) ) ); } - else + else if( me->buttons() == Qt::LeftButton ) { // left click - play the note int v = ( (float) x ) / ( (float) WHITE_KEY_WIDTH ) * MidiDefaultVelocity;