From 0528a00ccac94e5fccafd5e175371b21451dcf9d Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Sun, 24 May 2020 20:59:38 +0200 Subject: [PATCH] Compensate beat note length when stretching (#5515) * 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 --- src/gui/editors/PianoRoll.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 807696775..3c88b4c43 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -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 );