Skip to content

Commit

Permalink
Compensate beat note length when stretching (LMMS#5515)
Browse files Browse the repository at this point in the history
* Compensate beat note length when stretching

We allow stretching beat notes to normal notes but the length starts
from -192 so there is a lag for one whole note before any change is
seen. Compensate by setting the oldNote value to 1 when stretching
if the note is 0 or below in length.

Co-authored-by: Spekular <Spekular@users.noreply.github.com>
  • Loading branch information
zonkmachine and Spekular committed May 24, 2020
1 parent 48a73c6 commit 54c3949
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/editors/PianoRoll.cpp
Expand Up @@ -1606,6 +1606,11 @@ void PianoRoll::mousePressEvent(QMouseEvent * me )
// then resize the note
m_action = ActionResizeNote;

for (Note *note : getSelectedNotes())
{
if (note->oldLength() <= 0) { note->setOldLength(4); }
}

// set resize-cursor
QCursor c( Qt::SizeHorCursor );
QApplication::setOverrideCursor( c );
Expand Down

0 comments on commit 54c3949

Please sign in to comment.