From b38addd9c7989381c896f68ccf84bb617d1ee2d9 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 4 Oct 2008 23:25:18 +0000 Subject: [PATCH] do not crash when pressing right mouse button while moving a note with left mouse button git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1744 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 4 +++- src/gui/piano_roll.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 809b9609e..9da95bc28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,9 @@ set global alignment via a #define * src/gui/piano_roll.cpp: - fixed typo + - fixed typo + - do not crash when pressing right mouse button while moving a note + with left mouse button * src/core/song.cpp: lock mixer while adjusting lengths of notePlayHandles after tempo change diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index 031a9e6b0..f4ec2c8b0 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -1090,7 +1090,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me ) engine::getSong()->setModified(); } - else if( ( _me->button() == Qt::RightButton && + else if( ( _me->buttons() == Qt::RightButton && m_editMode == ModeDraw ) || m_editMode == ModeErase ) {