convert interface <> internal values for all automation

fixes Send-Fader, Gain-Automation and various Plugin-Slider ranges
This commit is contained in:
Robin Gareus 2014-11-01 07:25:47 +01:00
parent c855d17e09
commit 52f44dc4da
3 changed files with 19 additions and 24 deletions

View file

@ -522,14 +522,14 @@ ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string
box.add (_slider);
_slider.show ();
double const lo = c->lower ();
double const up = c->upper ();
double const lo = c->internal_to_interface(c->lower ());
double const up = c->internal_to_interface(c->upper ());
_adjustment.set_lower (lo);
_adjustment.set_upper (up);
_adjustment.set_step_increment ((up - lo) / 100);
_adjustment.set_page_increment ((up - lo) / 10);
_slider.set_default_value (c->normal ());
_slider.set_default_value (c->internal_to_interface(c->normal ()));
_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &Control::slider_adjusted));
c->Changed.connect (_connection, MISSING_INVALIDATOR, boost::bind (&Control::control_changed, this), gui_context ());
@ -581,7 +581,7 @@ ProcessorEntry::Control::slider_adjusted ()
return;
}
c->set_value ( _adjustment.get_value () );
c->set_value ( c->interface_to_internal(_adjustment.get_value ()) );
set_tooltip ();
}
@ -617,7 +617,7 @@ ProcessorEntry::Control::control_changed ()
} else {
_adjustment.set_value (c->get_value ());
_adjustment.set_value (c->internal_to_interface(c->get_value ()));
stringstream s;
s.precision (1);