diff options
author | Robin Gareus <robin@gareus.org> | 2016-07-04 00:19:13 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-07-04 00:20:11 +0200 |
commit | ff50b3780ab688371f1a0f7cb25c92da9b9712d5 (patch) | |
tree | f4bce02b27d1874554788fdaf7841bdb7b0c3170 /gtk2_ardour/automation_controller.cc | |
parent | 1f2d1b586e99f2777110298a4ec0e59f411e70a5 (diff) |
Replace Gtk::ToggleButton with ArdourButton in Generic Plugin GUI
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r-- | gtk2_ardour/automation_controller.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index f8e14595ba..cd76163c6c 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -90,6 +90,10 @@ AutomationController::AutomationController(boost::shared_ptr<Automatable> but->set_controllable(ac); but->signal_clicked.connect( sigc::mem_fun(*this, &AutomationController::toggled)); + const bool active = _adjustment->get_value() >= 0.5; + if (but->get_active() != active) { + but->set_active(active); + } _widget = but; } else if (use_knob) { ArdourKnob* knob = manage (new ArdourKnob (ArdourKnob::default_elements, ArdourKnob::Detent)); |