move cut/copy/delete/paste operations into EditingContext

derived classes (Editor and Pianoroll) provide ::cut_copy() to wrap the
context-specific logic, and then both defer to MidiView for MIDI-specific
operations.

Note that this also changes several action names in ardour.keys.in
This commit is contained in:
Paul Davis 2025-01-14 15:31:53 -07:00
parent 13161a3975
commit 4e8591da99
8 changed files with 136 additions and 37 deletions

View file

@ -421,15 +421,9 @@ Editor::register_actions ()
act = reg_sens (editor_actions, "editor-loudness-assistant", _("Loudness Assistant"), sigc::bind (sigc::mem_fun(*this, &Editor::loudness_assistant), true));
ActionManager::time_selection_sensitive_actions.push_back (act);
reg_sens (editor_actions, "editor-cut", _("Cut"), sigc::mem_fun(*this, &Editor::cut));
reg_sens (editor_actions, "editor-delete", _("Delete"), sigc::mem_fun(*this, &Editor::delete_));
reg_sens (editor_actions, "alternate-editor-delete", _("Delete"), sigc::mem_fun(*this, &Editor::delete_));
reg_sens (editor_actions, "split-region", _("Split/Separate"), sigc::mem_fun (*this, &Editor::split_region));
reg_sens (editor_actions, "editor-copy", _("Copy"), sigc::mem_fun(*this, &Editor::copy));
reg_sens (editor_actions, "editor-paste", _("Paste"), sigc::mem_fun(*this, &Editor::keyboard_paste));
reg_sens (editor_actions, "editor-fade-range", _("Fade Range Selection"), sigc::mem_fun(*this, &Editor::fade_range));
act = ActionManager::register_action (editor_actions, "set-tempo-from-edit-range", _("Set Tempo from Edit Range = Bar"), sigc::mem_fun(*this, &Editor::use_range_as_bar));