mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
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:
parent
13161a3975
commit
4e8591da99
8 changed files with 136 additions and 37 deletions
|
|
@ -306,6 +306,13 @@ EditingContext::register_common_actions (Bindings* common_bindings)
|
|||
redo_action = reg_sens (_common_actions, "redo", _("Redo"), []() { current_editing_context()->redo(1U) ; });
|
||||
alternate_redo_action = reg_sens (_common_actions, "alternate-redo", _("Redo"), []() { current_editing_context()->redo(1U) ; });
|
||||
alternate_alternate_redo_action = reg_sens (_common_actions, "alternate-alternate-redo", _("Redo"), []() { current_editing_context()->redo(1U) ; });
|
||||
|
||||
reg_sens (_common_actions, "editor-delete", _("Delete"), []() { current_editing_context()->delete_() ; });
|
||||
reg_sens (_common_actions, "alternate-editor-delete", _("Delete"), []() { current_editing_context()->delete_() ; });
|
||||
|
||||
reg_sens (_common_actions, "editor-cut", _("Cut"), []() { current_editing_context()->cut() ; });
|
||||
reg_sens (_common_actions, "editor-copy", _("Copy"), []() { current_editing_context()->copy() ; });
|
||||
reg_sens (_common_actions, "editor-paste", _("Paste"), []() { current_editing_context()->keyboard_paste() ; });
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3248,3 +3255,24 @@ EditingContext::zoom_focus_chosen (ZoomFocus focus)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditingContext::alt_delete_ ()
|
||||
{
|
||||
delete_ ();
|
||||
}
|
||||
|
||||
/** Cut selected regions, automation points or a time range */
|
||||
void
|
||||
EditingContext::cut ()
|
||||
{
|
||||
cut_copy (Cut);
|
||||
}
|
||||
|
||||
/** Copy selected regions, automation points or a time range */
|
||||
void
|
||||
EditingContext::copy ()
|
||||
{
|
||||
cut_copy (Copy);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue