From 2cffca4c400267280109e1a54f7d18cb595e914a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 7 Mar 2022 05:47:27 +0100 Subject: [PATCH] Restore rulers as saved with the session This fixes an issue with the videotimeline not being shown when reloading a session. Editor::set_state() restores the grid, which in turn changes ruler visibility. This triggers store_ruler_visibility() and the saved session state was lost. --- gtk2_ardour/editor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 9493946467..7a03c084c2 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1363,6 +1363,12 @@ Editor::set_session (Session *t) refresh_location_display (); + /* restore rulers before calling set_state() which sets the grid, + * which changes rulers and calls store_ruler_visibility() overriding + * any settings saved with the session. + */ + restore_ruler_visibility (); + /* This must happen after refresh_location_display(), as (amongst other things) we restore * the selected Marker; this needs the LocationMarker list to be available. */ @@ -1414,7 +1420,6 @@ Editor::set_session (Session *t) Config->map_parameters (pc); _session->config.map_parameters (pc); - restore_ruler_visibility (); //tempo_map_changed (PropertyChange (0)); TempoMap::Metrics metrics; TempoMap::use()->get_metrics (metrics);