add clear-all-cues item to cue marker ruler context menu
This commit is contained in:
parent
d69a2c3c13
commit
cf83815133
@ -1559,6 +1559,7 @@ private:
|
||||
void clear_markers ();
|
||||
void clear_xrun_markers ();
|
||||
void clear_ranges ();
|
||||
void clear_cues ();
|
||||
void clear_locations ();
|
||||
void unhide_markers ();
|
||||
void unhide_ranges ();
|
||||
|
@ -2562,6 +2562,28 @@ Editor::clear_ranges ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::clear_cues ()
|
||||
{
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
begin_reversible_command (_("clear cues"));
|
||||
|
||||
XMLNode &before = _session->locations()->get_state();
|
||||
|
||||
if (_session->locations()->clear_cue_markers (0, max_samplepos)) {
|
||||
|
||||
XMLNode &after = _session->locations()->get_state();
|
||||
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
|
||||
|
||||
commit_reversible_command ();
|
||||
} else {
|
||||
abort_reversible_command ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::clear_locations ()
|
||||
{
|
||||
|
@ -247,6 +247,7 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
|
||||
|
||||
case CueMarkerBarItem:
|
||||
ruler_items.push_back (MenuElem (_("Stop All Cues"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, CueRecord::stop_all)));
|
||||
ruler_items.push_back (MenuElem (_("Clear All Cues"), sigc::mem_fun (*this, &Editor::clear_cues)));
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) {
|
||||
ruler_items.push_back (MenuElem (string_compose (_("Cue %1"), cue_marker_name (n)), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, n)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user