summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gain_meter.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-01-22 11:43:27 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-01-22 11:58:16 -0500
commit0c9249604fdce2f313f356ca63d85fb8a0792e45 (patch)
tree68f034b49edd17c46dc86d35f8203667ebd14a70 /gtk2_ardour/gain_meter.cc
parent01fd887b9e429abf635c677eb000ca6c7e9095e7 (diff)
when leaving an active automation state, update fader displays to show correct current value
Diffstat (limited to 'gtk2_ardour/gain_meter.cc')
-rw-r--r--gtk2_ardour/gain_meter.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 5a2047cf73..90585c3676 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -848,9 +848,9 @@ GainMeterBase::gain_automation_style_changed ()
void
GainMeterBase::gain_automation_state_changed ()
{
- ENSURE_GUI_THREAD (*this, &GainMeterBase::gain_automation_state_changed)
+ ENSURE_GUI_THREAD (*this, &GainMeterBase::gain_automation_state_changed);
- bool x;
+ cerr << "GMB:autostate change to " << _amp->gain_control()->alist()->automation_state() << endl;
switch (_width) {
case Wide:
@@ -861,22 +861,24 @@ GainMeterBase::gain_automation_state_changed ()
break;
}
- x = (_amp->gain_control()->alist()->automation_state() != ARDOUR::Off);
+ const bool automation_watch_required = (_amp->gain_control()->alist()->automation_state() != ARDOUR::Off);
- if (gain_automation_state_button.get_active() != x) {
+ if (gain_automation_state_button.get_active() != automation_watch_required) {
ignore_toggle = true;
- gain_automation_state_button.set_active (x);
+ gain_automation_state_button.set_active (automation_watch_required);
ignore_toggle = false;
}
update_gain_sensitive ();
- /* start watching automation so that things move */
-
gain_watching.disconnect();
- if (x) {
+ if (automation_watch_required) {
+ /* start watching automation so that things move */
gain_watching = Timers::rapid_connect (sigc::mem_fun (*this, &GainMeterBase::effective_gain_display));
+ } else {
+ /* update once to get the correct value shown as we re-enter off/manual mode */
+ effective_gain_display();
}
}