From 571bdeb0538e9518dbb55ea2e6e7b14438eaf23d Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 1 Feb 2014 12:39:03 +0100 Subject: [PATCH] Timeline: additionally allow moving left loop point with middle mouse button Commit 3a53473d10474519db75efb443256aaca1a71730 aimed at allowing users without a middle mouse button (like on touchpads) to move the left loop point. However nothing stops us from keeping the old behaviour as well, so here we go! --- src/core/timeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/timeline.cpp b/src/core/timeline.cpp index 3c0aa6f11..54e1baff1 100644 --- a/src/core/timeline.cpp +++ b/src/core/timeline.cpp @@ -283,14 +283,14 @@ void timeLine::mousePressEvent( QMouseEvent* event ) m_moveXOff = s_posMarkerPixmap->width() / 2; } } - else if( event->button() == Qt::RightButton ) + else if( event->button() == Qt::RightButton || event->button() == Qt::MiddleButton ) { const MidiTime t = m_begin + static_cast( event->x() * MidiTime::ticksPerTact() / m_ppt ); if( m_loopPos[0] > m_loopPos[1] ) { qSwap( m_loopPos[0], m_loopPos[1] ); } - if( event->modifiers() & Qt::ShiftModifier ) + if( ( event->modifiers() & Qt::ShiftModifier ) || event->button() == Qt::MiddleButton ) { m_action = MoveLoopBegin; }