mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-10 01:58:44 -04:00
fixed bug where it thought every modifier was the alt key
corrected quantization when dragging a note while scrolling with arrow keys git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1872 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1612,7 +1612,7 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
&& m_editMode == ModeDraw
|
||||
&& (m_action == ActionMoveNote || m_action == ActionResizeNote ) )
|
||||
{
|
||||
dragNotes(_me->x(), _me->y(), _me->modifiers() && Qt::AltModifier);
|
||||
dragNotes(_me->x(), _me->y(), _me->modifiers() & Qt::AltModifier);
|
||||
}
|
||||
else if( ( edit_note == true || m_action == ActionChangeNoteVolume ) &&
|
||||
_me->buttons() & Qt::LeftButton )
|
||||
@@ -2026,6 +2026,11 @@ void pianoRoll::dragNotes( int x, int y, bool alt )
|
||||
int off_ticks = off_x * midiTime::ticksPerTact() / m_ppt;
|
||||
int off_key = getKey( y ) - getKey( m_moveStartY );
|
||||
|
||||
// handle scroll changes while dragging
|
||||
off_ticks -= m_mouseDownTick - m_currentPosition;
|
||||
off_key -= m_mouseDownKey - m_startKey;
|
||||
|
||||
|
||||
// if they're not holding alt, quantize the offset
|
||||
if( ! alt )
|
||||
{
|
||||
@@ -2033,10 +2038,6 @@ void pianoRoll::dragNotes( int x, int y, bool alt )
|
||||
* quantization();
|
||||
}
|
||||
|
||||
// handle scroll changes while dragging
|
||||
off_ticks -= m_mouseDownTick - m_currentPosition;
|
||||
off_key -= m_mouseDownKey - m_startKey;
|
||||
|
||||
// make sure notes won't go outside boundary conditions
|
||||
if( m_action == ActionMoveNote )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user