mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
fix the naming and behavior of always-play-range to match the button, which is follow-edits. when you select a range, the playhead should jump to the start of the range and begin to play the selection. BUT (unlike previous implementation) if the user wants to relocate the playhead, then that should be allowed. The user should always remain in charge of the playhead location. NOTE: your previous config setting will be invalidated. You must re-save a session to overwrite with the new config variable
This commit is contained in:
parent
53a5f5d8ca
commit
043b76569d
12 changed files with 23 additions and 15 deletions
|
|
@ -1909,7 +1909,7 @@ ARDOUR_UI::transport_roll ()
|
|||
}
|
||||
}
|
||||
|
||||
} else if (_session->get_play_range () && !Config->get_always_play_range()) {
|
||||
} else if (_session->get_play_range () ) {
|
||||
/* stop playing a range if we currently are */
|
||||
_session->request_play_range (0, true);
|
||||
}
|
||||
|
|
@ -1976,10 +1976,10 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
|
|||
if (rolling) {
|
||||
_session->request_stop (with_abort, true);
|
||||
} else {
|
||||
if ( Config->get_always_play_range() ) {
|
||||
if ( Config->get_follow_edits() && ( editor->get_selection().time.front().start == _session->transport_frame() ) ) { //if playhead is exactly at the start of a range, we can assume it was placed there by follow_edits
|
||||
_session->request_play_range (&editor->get_selection().time, true);
|
||||
_session->set_requested_return_frame( editor->get_selection().time.front().start ); //force an auto-return here
|
||||
}
|
||||
|
||||
_session->request_transport_speed (1.0f);
|
||||
}
|
||||
}
|
||||
|
|
@ -2153,7 +2153,7 @@ ARDOUR_UI::map_transport_state ()
|
|||
auto_loop_button.set_active (false);
|
||||
}
|
||||
|
||||
if (Config->get_always_play_range()) {
|
||||
if (Config->get_follow_edits()) {
|
||||
/* light up both roll and play-selection if they are joined */
|
||||
roll_button.set_active (true);
|
||||
play_selection_button.set_active (true);
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
boost::shared_ptr<TransportControllable> play_selection_controllable;
|
||||
boost::shared_ptr<TransportControllable> rec_controllable;
|
||||
|
||||
void toggle_always_play_range ();
|
||||
void toggle_follow_edits ();
|
||||
|
||||
void set_transport_controllable_state (const XMLNode&);
|
||||
XMLNode& get_transport_controllable_state ();
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ ARDOUR_UI::click_button_clicked (GdkEventButton* ev)
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_always_play_range ()
|
||||
ARDOUR_UI::toggle_follow_edits ()
|
||||
{
|
||||
RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("ToggleFollowEdits"));
|
||||
assert (act);
|
||||
|
|
@ -665,7 +665,7 @@ ARDOUR_UI::toggle_always_play_range ()
|
|||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
|
||||
assert (tact);
|
||||
|
||||
Config->set_always_play_range (tact->get_active ());
|
||||
Config->set_follow_edits (tact->get_active ());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ ARDOUR_UI::install_actions ()
|
|||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoReturn"), _("Auto Return"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_return));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleFollowEdits"), _("Follow Edits"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_always_play_range));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleFollowEdits"), _("Follow Edits"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_follow_edits));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
|
||||
} else if (p == "always-play-range") {
|
||||
|
||||
ActionManager::map_some_state ("Transport", "ToggleFollowEdits", &RCConfiguration::get_always_play_range);
|
||||
ActionManager::map_some_state ("Transport", "ToggleFollowEdits", &RCConfiguration::get_follow_edits);
|
||||
|
||||
} else if (p == "send-mtc") {
|
||||
|
||||
|
|
|
|||
|
|
@ -4349,7 +4349,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
|
|||
if ( s->get_play_range() && s->transport_rolling() ) {
|
||||
s->request_play_range (&_editor->selection->time, true);
|
||||
} else {
|
||||
if (Config->get_always_play_range() && !s->transport_rolling()) {
|
||||
if (Config->get_follow_edits() && !s->transport_rolling()) {
|
||||
s->request_locate (_editor->get_selection().time.start());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1293,7 +1293,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
}
|
||||
|
||||
//not rolling, range mode click + join_play_range : locate the PH here
|
||||
if ( !_drags->active () && !_session->transport_rolling() && ( effective_mouse_mode() == MouseRange ) && Config->get_always_play_range() ) {
|
||||
if ( !_drags->active () && !_session->transport_rolling() && ( effective_mouse_mode() == MouseRange ) && Config->get_follow_edits() ) {
|
||||
framepos_t where = canvas_event_sample (event);
|
||||
snap_to(where);
|
||||
_session->request_locate (where, false);
|
||||
|
|
|
|||
|
|
@ -2213,7 +2213,7 @@ Editor::get_preroll ()
|
|||
void
|
||||
Editor::maybe_locate_with_edit_preroll ( framepos_t location )
|
||||
{
|
||||
if ( _session->transport_rolling() || !Config->get_always_play_range() )
|
||||
if ( _session->transport_rolling() || !Config->get_follow_edits() )
|
||||
return;
|
||||
|
||||
location -= get_preroll();
|
||||
|
|
@ -5535,7 +5535,7 @@ Editor::set_playhead_cursor ()
|
|||
}
|
||||
}
|
||||
|
||||
if ( Config->get_always_play_range() )
|
||||
if ( Config->get_follow_edits() )
|
||||
cancel_time_selection();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1014,7 +1014,7 @@ Editor::time_selection_changed ()
|
|||
ActionManager::set_sensitive (ActionManager::time_selection_sensitive_actions, true);
|
||||
}
|
||||
|
||||
if (_session && Config->get_always_play_range() && !_session->transport_rolling() && !selection->time.empty()) {
|
||||
if (_session && Config->get_follow_edits() && !_session->transport_rolling() && !selection->time.empty()) {
|
||||
_session->request_locate (selection->time.start());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ CONFIG_VARIABLE (bool, secondary_clock_delta_edit_cursor, "secondary-clock-delta
|
|||
CONFIG_VARIABLE (bool, show_track_meters, "show-track-meters", true)
|
||||
CONFIG_VARIABLE (bool, locate_while_waiting_for_sync, "locate-while-waiting-for-sync", false)
|
||||
CONFIG_VARIABLE (bool, disable_disarm_during_roll, "disable-disarm-during-roll", false)
|
||||
CONFIG_VARIABLE (bool, always_play_range, "always-play-range", false)
|
||||
CONFIG_VARIABLE (bool, follow_edits, "follow-edits", false)
|
||||
CONFIG_VARIABLE (bool, super_rapid_clock_update, "super-rapid-clock-update", false)
|
||||
|
||||
/* metering */
|
||||
|
|
|
|||
|
|
@ -502,6 +502,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
|||
framepos_t transport_frame () const {return _transport_frame; }
|
||||
framepos_t audible_frame () const;
|
||||
framepos_t requested_return_frame() const { return _requested_return_frame; }
|
||||
void set_requested_return_frame(framepos_t return_to);
|
||||
|
||||
enum PullupFormat {
|
||||
pullup_Plus4Plus1,
|
||||
|
|
|
|||
|
|
@ -1635,6 +1635,13 @@ Session::request_bounded_roll (framepos_t start, framepos_t end)
|
|||
lar.push_back (ar);
|
||||
request_play_range (&lar, true);
|
||||
}
|
||||
|
||||
void
|
||||
Session::set_requested_return_frame (framepos_t return_to)
|
||||
{
|
||||
_requested_return_frame = return_to;
|
||||
}
|
||||
|
||||
void
|
||||
Session::request_roll_at_and_return (framepos_t start, framepos_t return_to)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue