Allow to reuse range context menu w/o track/region selection
This commit is contained in:
parent
019a3a1976
commit
b243b93072
@ -1922,7 +1922,7 @@ Editor::add_region_context_items (Menu_Helpers::MenuList& edit_items, std::share
|
||||
* @param edit_items List to add the items to.
|
||||
*/
|
||||
void
|
||||
Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
||||
Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items, bool time_selection_only)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
@ -1932,6 +1932,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Zoom to Range"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_selection), Horizontal)));
|
||||
|
||||
if (!time_selection_only) {
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Loudness Analysis"), sigc::mem_fun(*this, &Editor::loudness_analyze_range_selection)));
|
||||
edit_items.push_back (MenuElem (_("Spectral Analysis"), sigc::mem_fun(*this, &Editor::spectral_analyze_range_selection)));
|
||||
@ -1966,13 +1967,16 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
||||
sigc::bind (sigc::mem_fun (*this, &Editor::move_range_selection_start_or_end_to_region_boundary), true, true)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Separate"), mem_fun(*this, &Editor::separate_region_from_selection)));
|
||||
// edit_items.push_back (MenuElem (_("Convert to Region in Region List"), sigc::mem_fun(*this, &Editor::new_region_from_selection)));
|
||||
|
||||
if (!time_selection_only) {
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Select All in Range"), sigc::mem_fun(*this, &Editor::select_all_selectables_using_time_selection)));
|
||||
}
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Set Loop from Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::set_loop_from_selection), false)));
|
||||
@ -1980,9 +1984,12 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
||||
edit_items.push_back (MenuElem (_("Set Session Start/End from Selection"), sigc::mem_fun(*this, &Editor::set_session_extents_from_selection)));
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
|
||||
if (!time_selection_only) {
|
||||
edit_items.push_back (MenuElem (_("Add Range Markers"), sigc::mem_fun (*this, &Editor::add_location_from_selection)));
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
|
||||
edit_items.push_back (MenuElem (_("Crop Region to Range"), sigc::mem_fun(*this, &Editor::crop_region_to_selection)));
|
||||
edit_items.push_back (MenuElem (_("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_range), false)));
|
||||
|
||||
@ -1991,6 +1998,8 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
||||
edit_items.push_back (MenuElem (_("Consolidate (with processing)"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), ReplaceRange, true)));
|
||||
edit_items.push_back (MenuElem (_("Bounce"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), NewSource, false)));
|
||||
edit_items.push_back (MenuElem (_("Bounce (with processing)"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), NewSource, true)));
|
||||
}
|
||||
|
||||
edit_items.push_back (MenuElem (_("Export Range..."), sigc::mem_fun(*this, &Editor::export_selection)));
|
||||
if (ARDOUR_UI::instance()->video_timeline->get_duration() > 0) {
|
||||
edit_items.push_back (MenuElem (_("Export Video Range..."), sigc::bind (sigc::mem_fun(*(ARDOUR_UI::instance()), &ARDOUR_UI::export_video), true)));
|
||||
|
@ -866,7 +866,7 @@ private:
|
||||
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||
void add_region_context_items (Gtk::Menu_Helpers::MenuList&, std::shared_ptr<ARDOUR::Track>);
|
||||
void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||
void add_selection_context_items (Gtk::Menu_Helpers::MenuList&, bool time_selection_only = false);
|
||||
Gtk::MenuItem* _popup_region_menu_item;
|
||||
|
||||
void popup_control_point_context_menu (ArdourCanvas::Item*, GdkEvent*);
|
||||
|
Loading…
Reference in New Issue
Block a user