GUI to remove xrun markers

This commit is contained in:
Paul Davis 2021-03-16 16:49:49 -06:00
parent 951257909f
commit bcb3e75cec
3 changed files with 17 additions and 0 deletions

View File

@ -1471,6 +1471,7 @@ private:
void scroll_tracks_up ();
void set_mark ();
void clear_markers ();
void clear_xrun_markers ();
void clear_ranges ();
void clear_locations ();
void unhide_markers ();

View File

@ -2509,6 +2509,21 @@ Editor::clear_markers ()
}
}
void
Editor::clear_xrun_markers ()
{
if (_session) {
begin_reversible_command (_("clear xrun markers"));
XMLNode &before = _session->locations()->get_state();
_session->locations()->clear_xrun_markers ();
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
commit_reversible_command ();
}
}
void
Editor::clear_ranges ()
{

View File

@ -219,6 +219,7 @@ Editor::popup_ruler_menu (samplepos_t where, ItemType t)
case MarkerBarItem:
ruler_items.push_back (MenuElem (_("New location marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, false)));
ruler_items.push_back (MenuElem (_("Clear all locations"), sigc::mem_fun(*this, &Editor::clear_markers)));
ruler_items.push_back (MenuElem (_("Clear all xruns"), sigc::mem_fun(*this, &Editor::clear_xrun_markers)));
ruler_items.push_back (MenuElem (_("Unhide locations"), sigc::mem_fun(*this, &Editor::unhide_markers)));
break;