13
0

Editor: replicate nudge-forward/nudge-backward in the Editor/ action namespace and use these actions for the default key bindings

Previously the bindings were given to the Region/* equivalents and made insensitive if there was no selected region.

Given that we have specific actions for nudge-playhead-*, and the ones in Region/ will always work on regions
if there are any selected regions, this provides a better set of possible actions, even if the naming is not
totally consistent.
This commit is contained in:
Paul Davis 2020-07-19 22:43:35 -06:00
parent 92e67a1ab6
commit 808b4d69c8
2 changed files with 12 additions and 2 deletions

View File

@ -284,13 +284,13 @@ This mode provides many different operations on both regions and control points,
;; keypad
@rop|Region/nudge-backward|KP_Subtract|nudge backward
@select|Editor/nudge-backward|KP_Subtract|nudge backward
@trans|Common/nudge-next-backward|<@PRIMARY@>KP_Subtract|some text
@gmark|Common/alternate-jump-forward-to-mark|<@PRIMARY@>KP_Right|to next mark
@gmark|Common/alternate-jump-backward-to-mark|<@PRIMARY@>KP_Left|to previous mark
@rop|Region/nudge-forward|KP_Add|nudge forward
@select|Editor/nudge-forward|KP_Add|nudge forward
@trans|Common/nudge-next-forward|<@PRIMARY@>KP_Add|some text
@gedt|Common/start-range|comma|some text

View File

@ -260,6 +260,16 @@ Editor::register_actions ()
reg_sens (editor_actions, "toggle-all-existing-automation", _("Toggle All Existing Automation"), sigc::mem_fun (*this, &Editor::toggle_all_existing_automation));
reg_sens (editor_actions, "toggle-layer-display", _("Toggle Layer Display"), sigc::mem_fun (*this, &Editor::toggle_layer_display));
/* these "overlap" with Region/nudge-* and also Common/nudge-* but
* provide a single editor-related action that will nudge a region,
* selected marker or playhead
*/
reg_sens (editor_actions, "nudge-forward", _("Nudge Later"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_forward), false, false));
reg_sens (editor_actions, "alternate-nudge-forward", _("Nudge Later"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_forward), false, false));
reg_sens (editor_actions, "nudge-backward", _("Nudge Earlier"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_backward), false, false));
reg_sens (editor_actions, "alternate-nudge-backward", _("Nudge Earlier"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_backward), false, false));
act = reg_sens (editor_actions, "track-record-enable-toggle", _("Toggle Record Enable"), sigc::mem_fun(*this, &Editor::toggle_record_enable));
ActionManager::track_selection_sensitive_actions.push_back (act);
act = reg_sens (editor_actions, "track-solo-toggle", _("Toggle Solo"), sigc::mem_fun(*this, &Editor::toggle_solo));