mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-30 18:37:40 +01:00
Rec page: implement Undo actions and shortcuts
* undo is not (currently) a Global action, it's an Editor action * ... but we want the ability to undo a recording One option would be to chagne Undo to a Global action, which would have a sizable impact on code and existing shortcuts. Instead I'm choosing to implement a Rec-page-specific Undo action & shortcut It's conceivable that someday we would want the Recorder page to ONLY undo record operations, and the Mixer page to ONLY undo mixer operations, or something like that. This lays the foundation for that.
This commit is contained in:
parent
10ef8535c7
commit
483047635c
3 changed files with 28 additions and 2 deletions
|
|
@ -393,6 +393,9 @@ RecorderUI::register_actions ()
|
|||
ActionManager::register_action (group, "reset-input-peak-hold", _("Reset Input Peak Hold"), sigc::mem_fun (*this, &RecorderUI::peak_reset));
|
||||
ActionManager::register_action (group, "arm-all", _("Record Arm All Tracks"), sigc::mem_fun (*this, &RecorderUI::arm_all));
|
||||
ActionManager::register_action (group, "arm-none", _("Disable Record Arm of All Tracks"), sigc::mem_fun (*this, &RecorderUI::arm_none));
|
||||
ActionManager::register_action (group, "rec-undo", _("Undo"), sigc::mem_fun (*this, &RecorderUI::rec_undo));
|
||||
ActionManager::register_action (group, "rec-redo", _("Redo"), sigc::mem_fun (*this, &RecorderUI::rec_redo));
|
||||
ActionManager::register_action (group, "alternate-rec-redo", _("Redo"), sigc::mem_fun (*this, &RecorderUI::rec_redo));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1347,6 +1350,22 @@ RecorderUI::arm_none ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
RecorderUI::rec_undo ()
|
||||
{
|
||||
if (_session) {
|
||||
_session->undo (1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RecorderUI::rec_redo ()
|
||||
{
|
||||
if (_session) {
|
||||
_session->redo (1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RecorderUI::peak_reset ()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue