mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
change API of Editor::get_quantize_op() and fix flaky UX when using quantize-notes
This commit is contained in:
parent
6db28ef08d
commit
61d8ceaa85
4 changed files with 35 additions and 45 deletions
|
|
@ -4737,23 +4737,20 @@ MidiRegionView::note_to_y(uint8_t note) const
|
|||
void
|
||||
MidiRegionView::quantize_selected_notes ()
|
||||
{
|
||||
std::cerr << "QSN!\n";
|
||||
|
||||
RegionSelection rs;
|
||||
rs.push_back (this);
|
||||
|
||||
bool did_show_dialog;
|
||||
Quantize quant = trackview.editor().get_quantize_op (false, did_show_dialog);
|
||||
bool success;
|
||||
Quantize* quant = trackview.editor().get_quantize_op ();
|
||||
|
||||
if (!did_show_dialog) {
|
||||
/* use global grid */
|
||||
quant.set_start_grid (trackview.editor().get_grid_type_as_beats (success, midi_region()->source_position()));
|
||||
if (!success) {
|
||||
return;
|
||||
}
|
||||
quant.set_end_grid (quant.start_grid());
|
||||
if (!quant) {
|
||||
return;
|
||||
}
|
||||
|
||||
trackview.editor().apply_midi_note_edit_op (quant, rs);
|
||||
trackview.editor().apply_midi_note_edit_op (*quant, rs);
|
||||
|
||||
delete quant;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue