mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-09 07:14:38 -04:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user