Add action to locate to loop start/end

This commit is contained in:
Robin Gareus 2022-09-07 19:13:55 +02:00
parent fabb080672
commit 888d91d599
6 changed files with 40 additions and 0 deletions

View file

@ -945,6 +945,14 @@ Editor::location_gone (Location *location)
}
}
void
Editor::loop_location_changed (Location* l)
{
bool s = 0 != l;
ActionManager::get_action (X_("Common"), X_("jump-to-loop-start"))->set_sensitive (s);
ActionManager::get_action (X_("Common"), X_("jump-to-loop-end"))->set_sensitive (s);
}
void
Editor::tempo_map_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
{
@ -1950,6 +1958,24 @@ Editor::goto_nth_marker (int n)
}
}
void
Editor::jump_to_loop_marker (bool start)
{
if (!_session) {
return;
}
Location* l = _session->locations ()->auto_loop_location ();
if (!l) {
return;
}
if (start) {
_session->request_locate (l->start_sample());
} else {
_session->request_locate (l->end_sample());
}
}
void
Editor::toggle_marker_menu_glue ()
{