diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-07 00:11:19 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-07 00:14:09 +0200 |
commit | 2991d74da53edc5a3b09d1cfdf7703212fda5d99 (patch) | |
tree | 68e92618972d450660246c2679655bb518bfed14 /gtk2_ardour/ardour_ui2.cc | |
parent | aa2ddb5ea2b99797f24904d942ab682851dfb0b6 (diff) |
GUI: follow LatencyUpdated signal handler, prevent duplicate updates
Diffstat (limited to 'gtk2_ardour/ardour_ui2.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui2.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 575925153c..d180fbadbe 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -604,7 +604,7 @@ ARDOUR_UI::setup_transport () /* initialize */ latency_switch_changed (); - session_latency_updated (); + session_latency_updated (true); repack_transport_hbox (); update_clock_visibility (); @@ -631,8 +631,16 @@ ARDOUR_UI::latency_switch_changed () } void -ARDOUR_UI::session_latency_updated () +ARDOUR_UI::session_latency_updated (bool for_playback) { + if (!for_playback) { + /* latency updates happen in pairs, in the following order: + * - for capture + * - for playback + */ + return; + } + if (!_session) { route_latency_value.set_text ("--"); io_latency_value.set_text ("--"); |