From 23531b0fa5b2de44f3daf9e5071955d2a1880259 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 1 Dec 2009 13:21:41 +0000 Subject: [PATCH] now that MTC can cause a timecode format change, make sure that our handling of the change is threadsafe git-svn-id: svn://localhost/ardour2/branches/3.0@6243 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui_options.cc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index c00097d417..1b98ccfb92 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -390,14 +390,22 @@ ARDOUR_UI::parameter_changed (std::string p) break; } } else if (p == "video-pullup" || p == "timecode-format") { - if (session) { - primary_clock.set (session->audible_frame(), true); - secondary_clock.set (session->audible_frame(), true); - } else { - primary_clock.set (0, true); - secondary_clock.set (0, true); - } + reset_main_clocks (); } else if (p == "show-track-meters") { editor->toggle_meter_updating(); } } + +void +ARDOUR_UI::reset_main_clocks () +{ + ENSURE_GUI_THREAD (mem_fun (*this, &ARDOUR_UI::reset_main_clocks)); + + if (session) { + primary_clock.set (session->audible_frame(), true); + secondary_clock.set (session->audible_frame(), true); + } else { + primary_clock.set (0, true); + secondary_clock.set (0, true); + } +}