diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-01 13:21:41 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-01 13:21:41 +0000 |
commit | 23531b0fa5b2de44f3daf9e5071955d2a1880259 (patch) | |
tree | e5f49e25011c2ca190834d66ee22046bbfb91138 /gtk2_ardour/ardour_ui_options.cc | |
parent | 162020e3128439477bdf7d2de9fdf1ad149d37aa (diff) |
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
Diffstat (limited to 'gtk2_ardour/ardour_ui_options.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_options.cc | 22 |
1 files 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); + } +} |