diff --git a/gtk2_ardour/ardour.keys.in b/gtk2_ardour/ardour.keys.in index 85e5f503fe..913159c1c8 100644 --- a/gtk2_ardour/ardour.keys.in +++ b/gtk2_ardour/ardour.keys.in @@ -484,9 +484,7 @@ This mode provides many different operations on both regions and control points, @notes|Notes/quantize-selected-notes|q|Quantize Selected Notes -@notes|Notes/delete| Backspace|Delete Note Selection -@notes|Notes/alt-delete| Delete|Delete Note Selection -@notes|Main/Escape|Clear selection +@notes|Main/Escape| Clear selection @notes|Notes/select-next| Tab|Select next note @notes|Notes/select-previous| <@PRIMARY@>Tab|Select previous note diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 43bb2c7e91..06142df30f 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1408,6 +1408,7 @@ private: void split_region (); void delete_ (); + void alt_delete_ (); void cut (); void copy (); void paste (float times, bool from_context_menu); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index e6e7ca2b7b..2f0e0bc7dd 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -821,9 +821,6 @@ Editor::register_midi_actions (Bindings* midi_bindings) /* two versions to allow same action for Delete and Backspace */ - ActionManager::register_action (_midi_actions, X_("delete"), _("Delete Selection"), sigc::bind (sigc::mem_fun (*this, &Editor::midi_action), &MidiRegionView::delete_selection)); - ActionManager::register_action (_midi_actions, X_("alt-delete"), _("Delete Selection (alternate)"), sigc::bind (sigc::mem_fun (*this, &Editor::midi_action), &MidiRegionView::delete_selection)); - ActionManager::register_action (_midi_actions, X_("clear-selection"), _("Clear Note Selection"), sigc::bind (sigc::mem_fun (*this, &Editor::midi_action), &MidiRegionView::clear_note_selection)); ActionManager::register_action (_midi_actions, X_("invert-selection"), _("Invert Note Selection"), sigc::bind (sigc::mem_fun (*this, &Editor::midi_action), &MidiRegionView::invert_selection)); ActionManager::register_action (_midi_actions, X_("extend-selection"), _("Extend Note Selection"), sigc::bind (sigc::mem_fun (*this, &Editor::midi_action), &MidiRegionView::extend_selection)); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 767ec9ec63..ce5c890e6d 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -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 */