<menuitem action='ToggleAutoReturn'/>
<menuitem action='ToggleClick'/>
<menuitem action='toggle-follow-playhead'/>
<menuitem action='ToggleAutoReturn'/>
<menuitem action='ToggleClick'/>
<menuitem action='toggle-follow-playhead'/>
+ <menuitem action='toggle-stationary-playhead'/>
region_list_sort_type = (Editing::RegionListSortType) 0;
have_pending_keyboard_selection = false;
_follow_playhead = true;
region_list_sort_type = (Editing::RegionListSortType) 0;
have_pending_keyboard_selection = false;
_follow_playhead = true;
+ _stationary_playhead = false;
_xfade_visibility = true;
editor_ruler_menu = 0;
no_ruler_shown_update = false;
_xfade_visibility = true;
editor_ruler_menu = 0;
no_ruler_shown_update = false;
+ if ((prop = node.property ("stationary-playhead"))) {
+ bool yn = (prop->value() == "yes");
+ set_stationary_playhead (yn);
+ RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-stationary-playhead"));
+ if (act) {
+ RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
+ if (tact->get_active() != yn) {
+ tact->set_active (yn);
+ }
+ }
+ }
+
if ((prop = node.property ("region-list-sort-type"))) {
region_list_sort_type = (Editing::RegionListSortType) -1; // force change
reset_region_list_sort_type(str2regionlistsorttype(prop->value()));
if ((prop = node.property ("region-list-sort-type"))) {
region_list_sort_type = (Editing::RegionListSortType) -1; // force change
reset_region_list_sort_type(str2regionlistsorttype(prop->value()));
node->add_property ("show-waveforms-recording", _show_waveforms_recording ? "yes" : "no");
node->add_property ("show-measures", _show_measures ? "yes" : "no");
node->add_property ("follow-playhead", _follow_playhead ? "yes" : "no");
node->add_property ("show-waveforms-recording", _show_waveforms_recording ? "yes" : "no");
node->add_property ("show-measures", _show_measures ? "yes" : "no");
node->add_property ("follow-playhead", _follow_playhead ? "yes" : "no");
+ node->add_property ("stationary-playhead", _stationary_playhead ? "yes" : "no");
node->add_property ("xfades-visible", _xfade_visibility ? "yes" : "no");
node->add_property ("region-list-sort-type", enum2str(region_list_sort_type));
node->add_property ("mouse-mode", enum2str(mouse_mode));
node->add_property ("xfades-visible", _xfade_visibility ? "yes" : "no");
node->add_property ("region-list-sort-type", enum2str(region_list_sort_type));
node->add_property ("mouse-mode", enum2str(mouse_mode));
+void
+Editor::toggle_stationary_playhead ()
+{
+ RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-stationary-playhead"));
+ if (act) {
+ RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
+ set_stationary_playhead (tact->get_active());
+ }
+}
+
+void
+Editor::set_stationary_playhead (bool yn)
+{
+ if (_stationary_playhead != yn) {
+ if ((_stationary_playhead = yn) == true) {
+ /* catch up */
+ update_current_screen ();
+ }
+ instant_save ();
+ }
+}
+
void
Editor::toggle_xfade_active (boost::weak_ptr<Crossfade> wxfade)
{
void
Editor::toggle_xfade_active (boost::weak_ptr<Crossfade> wxfade)
{
/* playhead/screen stuff */
/* playhead/screen stuff */
+ void set_stationary_playhead (bool yn);
+ void toggle_stationary_playhead ();
+ bool stationary_playhead() const { return _stationary_playhead; }
+
void set_follow_playhead (bool yn);
void toggle_follow_playhead ();
bool follow_playhead() const { return _follow_playhead; }
void set_follow_playhead (bool yn);
void toggle_follow_playhead ();
bool follow_playhead() const { return _follow_playhead; }
bool _show_measures;
bool _show_waveforms;
bool _show_measures;
bool _show_waveforms;
+ bool _stationary_playhead;
bool _follow_playhead;
bool _show_waveforms_recording;
bool _follow_playhead;
bool _show_waveforms_recording;
act = ActionManager::register_action (editor_actions, "remove-last-capture", _("Remove Last Capture"), (mem_fun(*this, &Editor::remove_last_capture)));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "remove-last-capture", _("Remove Last Capture"), (mem_fun(*this, &Editor::remove_last_capture)));
ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_toggle_action (editor_actions, "toggle-stationary-playhead", _("Stationary Playhead"), (mem_fun(*this, &Editor::toggle_stationary_playhead)));
+ ActionManager::session_sensitive_actions.push_back (act);
+
act = ActionManager::register_action (editor_actions, "insert-time", _("Insert Time"), (mem_fun(*this, &Editor::do_insert_time)));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::track_selection_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "insert-time", _("Insert Time"), (mem_fun(*this, &Editor::do_insert_time)));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::track_selection_sensitive_actions.push_back (act);
redisplay_tempo (true);
#ifndef GTKOSX
redisplay_tempo (true);
#ifndef GTKOSX
- if (!autoscroll_active) {
+ if (!autoscroll_active && !_stationary_playhead) {
/* force rulers and canvas to move in lock step */
while (gtk_events_pending ()) {
gtk_main_iteration ();
/* force rulers and canvas to move in lock step */
while (gtk_events_pending ()) {
gtk_main_iteration ();
if (frame != last_update_frame) {
if (frame != last_update_frame) {
-#undef CONTINUOUS_SCROLL
-#ifndef CONTINUOUS_SCROLL
+ if ( !_stationary_playhead ) {
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
#ifdef DEBUG_CURRENT_SCREEN
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
#ifdef DEBUG_CURRENT_SCREEN
playhead_cursor->set_position (frame);
playhead_cursor->set_position (frame);
-#else // CONTINUOUS_SCROLL
/* don't do continuous scroll till the new position is in the rightmost quarter of the
editor canvas
/* don't do continuous scroll till the new position is in the rightmost quarter of the
editor canvas
playhead_cursor->set_position (frame);
playhead_cursor->set_position (frame);
-#endif // CONTINUOUS_SCROLL
virtual void set_selected_mixer_strip (TimeAxisView&) = 0;
virtual void hide_track_in_display (TimeAxisView& tv, bool temporary = false) = 0;
virtual void show_track_in_display (TimeAxisView& tv) = 0;
virtual void set_selected_mixer_strip (TimeAxisView&) = 0;
virtual void hide_track_in_display (TimeAxisView& tv, bool temporary = false) = 0;
virtual void show_track_in_display (TimeAxisView& tv) = 0;
+ virtual void set_stationary_playhead (bool yn) = 0;
+ virtual void toggle_stationary_playhead () = 0;
+ virtual bool stationary_playhead() const = 0;
virtual void set_follow_playhead (bool yn) = 0;
virtual void toggle_follow_playhead () = 0;
virtual bool follow_playhead() const = 0;
virtual void set_follow_playhead (bool yn) = 0;
virtual void toggle_follow_playhead () = 0;
virtual bool follow_playhead() const = 0;