From 9628cb147cee86cf1905f5378ca57f4dc082b993 Mon Sep 17 00:00:00 2001 From: Cameron Druyor <3418448+camerondruyor@users.noreply.github.com> Date: Mon, 20 Apr 2026 17:51:31 -0400 Subject: [PATCH] Add a zero note check for MIDI recording (#8328) Adds a check in finishRecordNote that verifies no notes of length 0 can be made, which was possible before. --------- Co-authored-by: bratpeki --- src/gui/editors/PianoRoll.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 2b40d0af9..51751ac95 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -4471,6 +4472,7 @@ void PianoRoll::finishRecordNote(const Note & n ) n1.quantizeLength(quantization()); n1.quantizePos(quantization()); } + n1.setLength(std::max(n1.length(), TimePos(1))); m_midiClip->addNote(n1, false); update(); m_recordingNotes.erase( it );