From 6ad5d88c086adb47c4019b3f7794bbbf0d8751bd Mon Sep 17 00:00:00 2001 From: Dave French Date: Sun, 1 Mar 2015 13:42:07 +0000 Subject: [PATCH] Reinstate Double Click opening the piano roll from song editor This fixes a bug introduced when removing double click from BB patterns. It Now checks if we use fixedTCO's (bb tomb stones), only disable double clikc if so, leaving it working correcly in the song editor --- include/Pattern.h | 1 + src/tracks/Pattern.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/Pattern.h b/include/Pattern.h index d57538404..1e3c5db10 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -180,6 +180,7 @@ protected slots: protected: virtual void constructContextMenu( QMenu * ); virtual void mousePressEvent( QMouseEvent * _me ); + virtual void mouseDoubleClickEvent( QMouseEvent * _me ); virtual void paintEvent( QPaintEvent * _pe ); virtual void resizeEvent( QResizeEvent * _re ) { diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index ca0f15e2c..cea27895a 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -846,6 +846,19 @@ void PatternView::mousePressEvent( QMouseEvent * _me ) } } +void PatternView::mouseDoubleClickEvent(QMouseEvent *_me) +{ + if( _me->button() != Qt::LeftButton ) + { + _me->ignore(); + return; + } + if( !fixedTCOs() ) + { + openInPianoRoll(); + } +} +