diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index d27a0505f2..9d2b3860ce 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1992,6 +1992,7 @@ ARDOUR_UI::load_session (const string & path, const string & snap_name, string* session->set_clean (); } + editor->edit_cursor_position (true); return 0; } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 2bd6c04f9d..aa37d297ed 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3684,3 +3684,12 @@ Editor::sort_track_selection () selection->tracks.sort (cmp); } +nframes_t +Editor::edit_cursor_position(bool sync) +{ + if (sync && edit_cursor->current_frame != edit_cursor_clock.current_time()) { + edit_cursor_clock.set(edit_cursor->current_frame, true); + } + + return edit_cursor->current_frame; +} diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 1f6bd80a63..b4f7a89bb4 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -339,6 +339,8 @@ class Editor : public PublicEditor void reset_zoom (double); void reposition_and_zoom (nframes_t, double); + nframes_t edit_cursor_position(bool); + protected: void map_transport_state (); void map_position_change (nframes_t); diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index ae87290c73..4b282b2f14 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -134,6 +134,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway virtual void remove_last_capture () = 0; virtual void maximise_editing_space() = 0; virtual void restore_editing_space() = 0; + virtual nframes_t edit_cursor_position(bool sync) = 0; sigc::signal ZoomFocusChanged; sigc::signal ZoomChanged;