mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
kbd bindings: fix issues with delete & backspace bindings in draw/i-edit mode
We now use the same actions in all modes, and the logic is: 1. is there a selected mixer strip and are we in it: if so, delete selected processors 2. are we in draw or internal mode? if so .. 2a. if there are selected control points, delete them 2b. if not, attempt to delete MIDI notes 2c. done 3. continue with delete operation as before
This commit is contained in:
parent
595e2e2914
commit
87b5849a7b
4 changed files with 26 additions and 9 deletions
|
|
@ -4418,11 +4418,32 @@ Editor::delete_ ()
|
|||
//special case: if the user is pointing in the editor/mixer strip, they may be trying to delete a plugin.
|
||||
//we need this because the editor-mixer strip is in the editor window, so it doesn't get the bindings from the mix window
|
||||
bool deleted = false;
|
||||
if (current_mixer_strip && current_mixer_strip == MixerStrip::entered_mixer_strip())
|
||||
deleted = current_mixer_strip->delete_processors ();
|
||||
|
||||
if (!deleted)
|
||||
if (current_mixer_strip && current_mixer_strip == MixerStrip::entered_mixer_strip()) {
|
||||
deleted = current_mixer_strip->delete_processors ();
|
||||
}
|
||||
|
||||
if (internal_editing()) {
|
||||
if (!selection->points.empty()) {
|
||||
begin_reversible_command (_("delete control points"));
|
||||
cut_copy_points (Delete, timepos_t (Temporal::AudioTime));
|
||||
selection->clear_points ();
|
||||
commit_reversible_command ();
|
||||
} else {
|
||||
midi_action (&MidiRegionView::delete_selection);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!deleted) {
|
||||
cut_copy (Delete);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::alt_delete_ ()
|
||||
{
|
||||
delete_ ();
|
||||
}
|
||||
|
||||
/** Cut selected regions, automation points or a time range */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue