GUI to set clock-origin marker
This commit is contained in:
parent
15150c57c1
commit
98439cf88c
@ -1710,6 +1710,7 @@ private:
|
||||
void toggle_marker_menu_lock ();
|
||||
void toggle_marker_menu_glue ();
|
||||
void marker_menu_hide ();
|
||||
void marker_menu_set_origin ();
|
||||
void marker_menu_loop_range ();
|
||||
void marker_menu_select_all_selectables_using_range ();
|
||||
void marker_menu_select_using_range ();
|
||||
|
@ -911,6 +911,7 @@ Editor::build_marker_menu (Location* loc)
|
||||
|
||||
items.push_back (MenuElem (_("Create Range to Next Marker"), sigc::mem_fun(*this, &Editor::marker_menu_range_to_next)));
|
||||
|
||||
items.push_back (MenuElem (_("Promote to Time Origin"), sigc::mem_fun(*this, &Editor::marker_menu_set_origin)));
|
||||
items.push_back (MenuElem (_("Hide"), sigc::mem_fun(*this, &Editor::marker_menu_hide)));
|
||||
items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &Editor::marker_menu_rename)));
|
||||
|
||||
@ -970,6 +971,7 @@ Editor::build_range_marker_menu (Location* loc, bool loop_or_punch, bool session
|
||||
items.push_back (MenuElem (_("Export Range..."), sigc::mem_fun(*this, &Editor::export_range)));
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Promote to Time Origin"), sigc::mem_fun(*this, &Editor::marker_menu_set_origin)));
|
||||
if (!loop_or_punch_or_session) {
|
||||
items.push_back (MenuElem (_("Hide Range"), sigc::mem_fun(*this, &Editor::marker_menu_hide)));
|
||||
items.push_back (MenuElem (_("Rename Range..."), sigc::mem_fun(*this, &Editor::marker_menu_rename)));
|
||||
@ -1086,6 +1088,24 @@ Editor::marker_menu_hide ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::marker_menu_set_origin ()
|
||||
{
|
||||
ArdourMarker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<ArdourMarker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
abort(); /*NOTREACHED*/
|
||||
}
|
||||
|
||||
Location* l;
|
||||
bool is_start;
|
||||
|
||||
if ((l = find_location_from_marker (marker, is_start)) != 0) {
|
||||
_session->locations()->set_clock_origin (l, this);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::marker_menu_select_using_range ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user