summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_strip.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-10-31 15:55:46 +0100
committerRobin Gareus <robin@gareus.org>2019-10-31 16:12:27 +0100
commitab298f035ae32532a48af315426b07fe8e1f12be (patch)
treeeb6bf36189d9492a417b650b5ebc8062cf6445da /gtk2_ardour/mixer_strip.cc
parent3cae11936f2cbd636eb5251ddd1abfb98da231ff (diff)
Consolidate automation and meter-point strings
This also properly selects texts in dropdown-menus on the mixer-strip, panner and plugin-controls, gain-meters.
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r--gtk2_ardour/mixer_strip.cc21
1 files changed, 6 insertions, 15 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 27769d9169..79848f7466 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -782,6 +782,12 @@ MixerStrip::set_width_enum (Width w, void* owner)
const float scale = std::max(1.f, UIConfiguration::instance().get_ui_scale());
+ gpm.gain_automation_state_button.set_text (GainMeterBase::short_astate_string (gain_automation->automation_state()));
+
+ if (_route->panner()) {
+ ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (GainMeterBase::short_astate_string (_route->panner()->automation_state()));
+ }
+
switch (w) {
case Wide:
@@ -789,14 +795,6 @@ MixerStrip::set_width_enum (Width w, void* owner)
show_sends_button->set_text (_("Aux"));
}
- gpm.gain_automation_state_button.set_text (
- gpm.astate_string(gain_automation->automation_state()));
-
- if (_route->panner()) {
- ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (
- panners.astate_string(_route->panner()->automation_state()));
- }
-
{
// panners expect an even number of horiz. pixels
int width = rintf (max (110.f * scale, gpm.get_gm_width() + 10.f * scale)) + 1;
@@ -811,15 +809,8 @@ MixerStrip::set_width_enum (Width w, void* owner)
show_sends_button->set_text (_("Snd"));
}
- gpm.gain_automation_state_button.set_text (
- gpm.short_astate_string(gain_automation->automation_state()));
gain_meter().setup_meters (); // recalc meter width
- if (_route->panner()) {
- ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (
- panners.short_astate_string(_route->panner()->automation_state()));
- }
-
{
// panners expect an even number of horiz. pixels
int width = rintf (max (60.f * scale, gpm.get_gm_width() + 10.f * scale)) + 1;