L: (backport?) add an action to explicitly create section markers
This commit is contained in:
parent
8b09ece660
commit
9134a6968a
|
@ -662,6 +662,8 @@ ARDOUR_UI::install_dependent_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, "add-location-from-playhead", _("Add Mark from Playhead"), sigc::mem_fun(editor, &PublicEditor::add_location_from_playhead_cursor));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, "add-section-from-playhead", _("Add Section Marker from Playhead"), sigc::mem_fun(editor, &PublicEditor::add_section_marker_from_playhead_cursor));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, "alternate-add-location-from-playhead", _("Add Mark from Playhead"), sigc::mem_fun(editor, &PublicEditor::add_location_from_playhead_cursor));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
|
|
|
@ -1642,6 +1642,7 @@ private:
|
|||
|
||||
void toggle_location_at_playhead_cursor ();
|
||||
void add_location_from_playhead_cursor ();
|
||||
void add_section_marker_from_playhead_cursor ();
|
||||
bool do_remove_location_at_playhead_cursor ();
|
||||
void remove_location_at_playhead_cursor ();
|
||||
bool select_new_marker;
|
||||
|
|
|
@ -2441,6 +2441,18 @@ Editor::add_location_from_playhead_cursor ()
|
|||
add_location_mark (timepos_t (_session->audible_sample()));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::add_section_marker_from_playhead_cursor ()
|
||||
{
|
||||
timepos_t where = timepos_t(_session->audible_sample());
|
||||
add_location_mark (where);
|
||||
Location *mark = _session->locations()->mark_at (where);
|
||||
if (mark) {
|
||||
mark->set_section(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::do_remove_location_at_playhead_cursor ()
|
||||
{
|
||||
|
|
|
@ -930,6 +930,7 @@ LuaInstance::register_classes (lua_State* L, bool sandbox)
|
|||
.addFunction ("goto_nth_marker", &PublicEditor::goto_nth_marker)
|
||||
|
||||
.addFunction ("add_location_from_playhead_cursor", &PublicEditor::add_location_from_playhead_cursor)
|
||||
.addFunction ("add_section_marker_from_playhead_cursor", &PublicEditor::add_section_marker_from_playhead_cursor)
|
||||
.addFunction ("remove_location_at_playhead_cursor", &PublicEditor::remove_location_at_playhead_cursor)
|
||||
.addFunction ("add_location_mark", &PublicEditor::add_location_mark)
|
||||
|
||||
|
|
|
@ -257,6 +257,7 @@ public:
|
|||
virtual void trigger_script (int nth) = 0;
|
||||
virtual void add_bbt_marker_at_playhead_cursor () = 0;
|
||||
virtual void add_location_from_playhead_cursor () = 0;
|
||||
virtual void add_section_marker_from_playhead_cursor () = 0;
|
||||
virtual void remove_location_at_playhead_cursor () = 0;
|
||||
virtual void add_location_mark (Temporal::timepos_t const & where) = 0;
|
||||
virtual void update_grid () = 0;
|
||||
|
|
Loading…
Reference in New Issue