Use section delete for Editor::Delete operation

This commit is contained in:
Robin Gareus 2023-09-06 00:02:01 +02:00
parent 6e87a46ba4
commit 10ff5ad599
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -4642,7 +4642,7 @@ Editor::cut_copy (CutCopyOp op)
if (get_edit_op_range (start, end)) {
selection->set (start, end);
}
} else if (!selection->time.empty()) {
} else if (!selection->time.empty() && !selection->tracks.empty()) {
begin_reversible_command (opname + ' ' + _("range"));
did_edit = true;
@ -4651,6 +4651,12 @@ Editor::cut_copy (CutCopyOp op)
if (op == Cut || op == Delete) {
selection->clear_time ();
}
} else if (!selection->time.empty()) {
if (op == Delete) {
/* note: UNDO is handled inside cut_copy_section */
cut_copy_section (DeleteSection);
selection->clear_time ();
}
}
if (did_edit) {