Skip to content

Commit

Permalink
Limit note length to quantization value
Browse files Browse the repository at this point in the history
Draging a note to it's minimum value of 1 will add this new length to
the note if you later choose to stretch it which will not be clearly
visible in the Piano Roll unless you zoom in a bit. Limit the note
length to the quantization value and use <Alt> key to override and set
a smaller value.
  • Loading branch information
zonkmachine committed May 9, 2020
1 parent 79511d6 commit aa08c52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2811,8 +2811,8 @@ void PianoRoll::dragNotes( int x, int y, bool alt, bool shift, bool ctrl )
if (note->selected())
{
int newLength = note->oldLength() + off_ticks;
newLength = qMax(1, newLength);
note->setLength( MidiTime(newLength) );
newLength = qMax(alt ? 1 : quantization(), newLength);
note->setLength(MidiTime(newLength));

m_lenOfNewNotes = note->length();
}
Expand Down

0 comments on commit aa08c52

Please sign in to comment.