diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-12 16:48:50 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-12 16:48:50 +0000 |
commit | c214f1630a670e473375e6ad2e9422c1dd815cfb (patch) | |
tree | 5f22a1e3e1996c153a9551821bd8a8117f194c98 /gtk2_ardour/audio_clock.cc | |
parent | 7253e8ff84d294a5527e985551ebc43f2a9b1df9 (diff) |
fix for crash caused as slave is switching from non-TC source to TC-source
git-svn-id: svn://localhost/ardour2/branches/3.0@13453 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_clock.cc')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index bb92cb7ae4..b6c969a502 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -1044,14 +1044,12 @@ AudioClock::set_slave_info () TimecodeSlave* tcslave; if ((tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) { matching = (tcslave->apparent_timecode_format() == _session->config.get_timecode_format()); - } else { - matching = true; + _left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"%2\">%3</span>", + INFO_FONT_SIZE, (matching?X_("green"):X_("red")), + dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position())); + _right_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>", + INFO_FONT_SIZE, slave->approximate_current_delta())); } - _left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"%2\">%3</span>", - INFO_FONT_SIZE, (matching?"green":"red"), - dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position())); - _right_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>", - INFO_FONT_SIZE, slave->approximate_current_delta())); } else { _left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>", INFO_FONT_SIZE, _("--pending--"))); |