shortest note length after a drag-trim is 1 tick, not 1/512 beats
This commit is contained in:
parent
fd62b38f8d
commit
e6ce5a611c
@ -3079,7 +3079,8 @@ MidiRegionView::update_resizing (NoteBase* primary, bool at_front, double delta_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
len = std::max(Temporal::Beats(1 / 512.0), len);
|
/* minimum length resulting from a trim is 1 tick */
|
||||||
|
len = std::max (Temporal::Beats (0,1), len);
|
||||||
|
|
||||||
char buf[16];
|
char buf[16];
|
||||||
snprintf (buf, sizeof (buf), "%.3g beats", len.to_double());
|
snprintf (buf, sizeof (buf), "%.3g beats", len.to_double());
|
||||||
@ -3175,8 +3176,7 @@ MidiRegionView::commit_resizing (NoteBase* primary, bool at_front, double delta_
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!at_front) {
|
if (!at_front) {
|
||||||
Temporal::Beats len = std::max(Temporal::Beats(1 / 512.0),
|
Temporal::Beats len = std::max (Temporal::Beats(0, 1), x_beats - canvas_note->note()->time() - (sign * snap_delta_beats));
|
||||||
x_beats - canvas_note->note()->time() - (sign * snap_delta_beats));
|
|
||||||
note_diff_add_change (canvas_note, MidiModel::NoteDiffCommand::Length, len);
|
note_diff_add_change (canvas_note, MidiModel::NoteDiffCommand::Length, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user