initial addition of Ripple All edit mode to GUI

This commit is contained in:
Paul Davis 2021-06-02 16:05:51 -06:00
parent 2f11a49103
commit 27456b93ad
3 changed files with 7 additions and 0 deletions

View File

@ -212,6 +212,7 @@ static const gchar *_edit_mode_strings[] = {
N_("Slide"),
N_("Splice"),
N_("Ripple"),
N_("Ripple All"),
N_("Lock"),
0
};
@ -3230,6 +3231,7 @@ Editor::build_edit_mode_menu ()
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Slide], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Slide)));
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Ripple], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Ripple)));
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)RippleAll], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) RippleAll)));
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Lock], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Lock)));
/* Note: Splice was removed */
@ -3691,6 +3693,9 @@ Editor::cycle_edit_mode ()
break;
case Splice:
case Ripple:
Config->set_edit_mode (RippleAll);
break;
case RippleAll:
Config->set_edit_mode (Lock);
break;
case Lock:

View File

@ -582,6 +582,7 @@ Editor::register_actions ()
// ActionManager::register_action (editor_actions, "set-edit-splice", _("Splice"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Splice));
ActionManager::register_action (editor_actions, "set-edit-ripple", _("Ripple"), bind (mem_fun (*this, &Editor::set_edit_mode), Ripple));
ActionManager::register_action (editor_actions, "set-edit-ripple-all", _("Ripple All"), bind (mem_fun (*this, &Editor::set_edit_mode), RippleAll));
ActionManager::register_action (editor_actions, "set-edit-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide));
ActionManager::register_action (editor_actions, "set-edit-lock", S_("EditMode|Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
ActionManager::register_action (editor_actions, "cycle-edit-mode", _("Cycle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode));

View File

@ -2583,6 +2583,7 @@ Editor::add_region_drag (ArdourCanvas::Item* item, GdkEvent*, RegionView* region
_drags->add (new RegionSpliceDrag (this, item, region_view, selection->regions.by_layer()));
break;
case Ripple:
case RippleAll:
_drags->add (new RegionRippleDrag (this, item, region_view, selection->regions.by_layer()));
break;
default: