summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gain_meter.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-07-15 20:50:26 +0200
committerRobin Gareus <robin@gareus.org>2017-07-16 16:58:00 +0200
commit5aecfc5acb41f6d05804a88b99eec159e96a66c9 (patch)
treefbe3b294fc30297e479d4c776e5fc74cb033dd34 /gtk2_ardour/gain_meter.cc
parent69ecb0db70996a5c1092efe712d195ffcff5e8b1 (diff)
Remove Timers to watch Controllable values
Depend on Changed() signals alone, which are usually much less frequent than rapid-timer events. As side-effect we now need to make the widgets insensitive when playing automation. Previously the user could not change the value because the Timer periodically reset it.
Diffstat (limited to 'gtk2_ardour/gain_meter.cc')
-rw-r--r--gtk2_ardour/gain_meter.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 9bc31e9760..e60c6613eb 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -617,7 +617,8 @@ GainMeterBase::effective_gain_display ()
void
GainMeterBase::gain_changed ()
{
- Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&GainMeterBase::effective_gain_display, this));
+ ENSURE_GUI_THREAD (*this, &GainMeterBase::gain_automation_state_changed);
+ effective_gain_display ();
}
void
@@ -813,14 +814,6 @@ GainMeterBase::gain_automation_state_changed ()
update_gain_sensitive ();
gain_watching.disconnect();
-
- 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();
- }
}
const ChanCount