provide new actions to jump to prev/next location marker (no other markers)
This commit is contained in:
parent
1f35010713
commit
2d8c641314
@ -583,6 +583,14 @@ ARDOUR_UI::install_dependent_actions ()
|
||||
act = ActionManager::register_action (common_actions, "jump-forward-to-mark", _("Jump to Next Mark"), sigc::mem_fun(*editor, &PublicEditor::jump_forward_to_mark));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (common_actions, "jump-backward-to-location-mark", _("Jump to Previous Location Mark"),
|
||||
sigc::bind (sigc::mem_fun(*editor, &PublicEditor::jump_backward_to_mark_flagged), Location::Flags (0), Location::Flags (0), Location::IsMark));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (common_actions, "jump-forward-to-location-mark", _("Jump to Next Location Mark"),
|
||||
sigc::bind (sigc::mem_fun(*editor, &PublicEditor::jump_forward_to_mark_flagged), Location::Flags (0), Location::Flags (0), Location::IsMark));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
for (int i = 1; i <= 9; ++i) {
|
||||
string const a = string_compose(X_("goto-mark-%1"), i);
|
||||
string const n = string_compose(_("Locate to Mark %1"), i);
|
||||
|
@ -740,8 +740,8 @@ private:
|
||||
void update_selection_markers ();
|
||||
void update_section_box ();
|
||||
|
||||
void jump_forward_to_mark ();
|
||||
void jump_backward_to_mark ();
|
||||
void jump_forward_to_mark_flagged (ARDOUR::Location::Flags, ARDOUR::Location::Flags, ARDOUR::Location::Flags);
|
||||
void jump_backward_to_mark_flagged (ARDOUR::Location::Flags, ARDOUR::Location::Flags, ARDOUR::Location::Flags);
|
||||
|
||||
struct LocationMarkers {
|
||||
ArdourMarker* start;
|
||||
|
@ -2563,13 +2563,13 @@ Editor::add_location_from_region ()
|
||||
/* MARKS */
|
||||
|
||||
void
|
||||
Editor::jump_forward_to_mark ()
|
||||
Editor::jump_forward_to_mark_flagged (Location::Flags whitelist, Location::Flags blacklist, Location::Flags equalist)
|
||||
{
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
timepos_t pos = _session->locations()->first_mark_after (timepos_t (_session->transport_sample()+1));
|
||||
timepos_t pos = _session->locations()->first_mark_after_flagged (timepos_t (_session->transport_sample()+1), true, whitelist, blacklist, equalist);
|
||||
|
||||
if (pos == timepos_t::max (Temporal::AudioTime)) {
|
||||
return;
|
||||
@ -2579,13 +2579,13 @@ Editor::jump_forward_to_mark ()
|
||||
}
|
||||
|
||||
void
|
||||
Editor::jump_backward_to_mark ()
|
||||
Editor::jump_backward_to_mark_flagged (Location::Flags whitelist, Location::Flags blacklist, Location::Flags equalist)
|
||||
{
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
timepos_t pos = _session->locations()->first_mark_before (timepos_t (_playhead_cursor->current_sample()));
|
||||
timepos_t pos = _session->locations()->first_mark_before_flagged (timepos_t (_playhead_cursor->current_sample()), true, whitelist, blacklist, equalist);
|
||||
|
||||
//handle the case where we are rolling, and we're less than one-half second past the mark, we want to go to the prior mark...
|
||||
if (_session->transport_rolling()) {
|
||||
|
@ -266,8 +266,14 @@ public:
|
||||
virtual void set_loop_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd) = 0;
|
||||
virtual void set_punch_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd) = 0;
|
||||
|
||||
virtual void jump_forward_to_mark () = 0;
|
||||
virtual void jump_backward_to_mark () = 0;
|
||||
void jump_forward_to_mark () {
|
||||
jump_forward_to_mark_flagged (ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0));
|
||||
}
|
||||
void jump_backward_to_mark () {
|
||||
jump_backward_to_mark_flagged (ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0));
|
||||
}
|
||||
virtual void jump_forward_to_mark_flagged (ARDOUR::Location::Flags whitelist, ARDOUR::Location::Flags blacklist, ARDOUR::Location::Flags equalist) = 0;
|
||||
virtual void jump_backward_to_mark_flagged (ARDOUR::Location::Flags whitelist, ARDOUR::Location::Flags blacklist, ARDOUR::Location::Flags equalist) = 0;
|
||||
|
||||
virtual void set_session_start_from_playhead () = 0;
|
||||
virtual void set_session_end_from_playhead () = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user