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 <pkatic2003@gmail.com>
This commit is contained in:
Cameron Druyor
2026-04-20 17:51:31 -04:00
committed by GitHub
parent 6f50f90b9c
commit 9628cb147c

View File

@@ -43,6 +43,7 @@
#include <QStyleOption>
#include <QToolButton>
#include <algorithm>
#include <cmath>
#include <utility>
@@ -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 );