diff options
author | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-08-19 02:48:39 +0200 |
---|---|---|
committer | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-08-19 02:53:39 +0200 |
commit | d599be115df673bc5833527491788afa1156c7f5 (patch) | |
tree | 6fb26b3eed7e8000c03ae7b00543cbe2931bc303 /gtk2_ardour/generic_pluginui.cc | |
parent | ede27f53c6c9ddd125f47ab6f602856fc2df0ea8 (diff) |
Make automation state buttons active when not on Manual
With the same color code as the fader automation button on mixer strips.
This is especially usefull when use_knob is true (e.g. for a-EQ) because
the automation only shows one letter and a "Write" state can thus be
easy to miss.
Diffstat (limited to 'gtk2_ardour/generic_pluginui.cc')
-rw-r--r-- | gtk2_ardour/generic_pluginui.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index c68c699caf..010dfe5237 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -588,15 +588,17 @@ GenericPluginUI::automation_state_changed (ControlUI* cui) // don't lock to avoid deadlock because we're triggered by // AutomationControl::Changed() while the automation lock is taken + AutoState state = insert->get_parameter_automation_state (cui->parameter()); + + cui->automate_button.set_active((state != ARDOUR::Off)); + if (cui->knobtable) { cui->automate_button.set_text ( - GainMeterBase::astate_string ( - insert->get_parameter_automation_state (cui->parameter())) - ); + GainMeterBase::astate_string (state)); return; } - switch (insert->get_parameter_automation_state (cui->parameter()) & (ARDOUR::Off|Play|Touch|Write)) { + switch (state & (ARDOUR::Off|Play|Touch|Write)) { case ARDOUR::Off: cui->automate_button.set_text (S_("Automation|Manual")); break; |