PianoRoll: do not make notes disappear under certain circumstances
When starting LMMS, loading an existing project and opening a pattern
with notes inside in piano roll, moving single notes showed unexpected
behaviour, i.e. the according note has been moved somewhere unreachable.
I tracked this down to a missing initialization of m_moveBoundary*
variables. Adding a few lines fixes the issue (closes #2632909).
(cherry picked from commit efb335cea7)
This commit is contained in:
@@ -150,6 +150,12 @@ pianoRoll::pianoRoll( void ) :
|
||||
m_currentNote( NULL ),
|
||||
m_action( ActionNone ),
|
||||
m_noteEditMode( NoteEditVolume ),
|
||||
m_moveBoundaryLeft( 0 ),
|
||||
m_moveBoundaryTop( 0 ),
|
||||
m_moveBoundaryRight( 0 ),
|
||||
m_moveBoundaryBottom( 0 ),
|
||||
m_mouseDownKey( 0 ),
|
||||
m_mouseDownTick( 0 ),
|
||||
m_lastMouseX( 0 ),
|
||||
m_lastMouseY( 0 ),
|
||||
m_oldNotesEditHeight( 100 ),
|
||||
@@ -1482,6 +1488,10 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
clearSelectedNotes();
|
||||
m_currentNote->setSelected( true );
|
||||
m_moveBoundaryLeft = m_currentNote->pos().getTicks();
|
||||
m_moveBoundaryRight = m_currentNote->pos() + m_currentNote->length();
|
||||
m_moveBoundaryBottom = m_currentNote->key();
|
||||
m_moveBoundaryTop = m_currentNote->key();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user