add Duplicate action to track and mixer context menus

This commit is contained in:
Ben Loftis 2015-11-17 16:55:11 -06:00
parent a95f8a8648
commit 6f955aa0bd
4 changed files with 20 additions and 4 deletions

View file

@ -1586,6 +1586,11 @@ MixerStrip::build_route_ops_menu ()
items.push_back (MenuElem (_("Remote Control ID..."), sigc::mem_fun (*this, &RouteUI::open_remote_control_id_dialog))); items.push_back (MenuElem (_("Remote Control ID..."), sigc::mem_fun (*this, &RouteUI::open_remote_control_id_dialog)));
} }
if (_route && !_route->is_master()) {
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Duplicate..."), sigc::mem_fun (*this, &RouteUI::duplicate_selected_routes)));
}
if (_route) { if (_route) {
/* note that this relies on selection being shared across editor and /* note that this relies on selection being shared across editor and
mixer (or global to the backend, in the future), which is the only mixer (or global to the backend, in the future), which is the only
@ -1599,8 +1604,8 @@ MixerStrip::build_route_ops_menu ()
selection.set (rtav); selection.set (rtav);
} }
items.push_front (SeparatorElem()); items.push_back (SeparatorElem());
items.push_front (MenuElem (_("Remove"), sigc::mem_fun(PublicEditor::instance(), &PublicEditor::remove_tracks))); items.push_back (MenuElem (_("Remove"), sigc::mem_fun(PublicEditor::instance(), &PublicEditor::remove_tracks)));
} }
} }
} }

View file

@ -864,8 +864,12 @@ RouteTimeAxisView::build_display_menu ()
items.push_back (SeparatorElem()); items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Hide"), sigc::bind (sigc::mem_fun(_editor, &PublicEditor::hide_track_in_display), this, true))); items.push_back (MenuElem (_("Hide"), sigc::bind (sigc::mem_fun(_editor, &PublicEditor::hide_track_in_display), this, true)));
items.push_front (SeparatorElem()); if (_route && !_route->is_master()) {
items.push_front (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks))); items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Duplicate..."), boost::bind (&ARDOUR_UI::start_duplicate_routes, ARDOUR_UI::instance())));
}
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks)));
} }
void void

View file

@ -1729,6 +1729,12 @@ RouteUI::set_route_active (bool a, bool apply_to_selection)
} }
} }
void
RouteUI::duplicate_selected_routes ()
{
ARDOUR_UI::instance()->start_duplicate_routes();
}
void void
RouteUI::toggle_denormal_protection () RouteUI::toggle_denormal_protection ()
{ {

View file

@ -194,6 +194,7 @@ class RouteUI : public virtual AxisView
virtual void route_active_changed () {} virtual void route_active_changed () {}
void set_route_active (bool, bool); void set_route_active (bool, bool);
void duplicate_selected_routes ();
Gtk::Menu* record_menu; Gtk::Menu* record_menu;
void build_record_menu (); void build_record_menu ();