/* compute vertical fractional position */
- y = 1.0 - (y / (trackview.current_height() - NAME_HIGHLIGHT_SIZE));
-
+ y = 1.0 - (y / (_height - NAME_HIGHLIGHT_SIZE));
+
/* map using gain line */
gain_line->view_to_model_y (y);
trackview.session().register_with_memento_command_factory(alist->id(), this);
- if (alist->parameter().type() == GainAutomation) {
+ if (alist->parameter().type() == GainAutomation ||
+ alist->parameter().type() == EnvelopeAutomation) {
set_uses_gain_mapping (true);
}
AutomationLine::view_to_model_y (double& y) const
{
/* TODO: This should be more generic ... */
- if (alist->parameter().type() == GainAutomation) {
+ if (alist->parameter().type() == GainAutomation ||
+ alist->parameter().type() == EnvelopeAutomation) {
y = slider_position_to_gain (y);
y = max (0.0, y);
y = min (2.0, y);
AutomationLine::model_to_view_y (double& y) const
{
/* TODO: This should be more generic ... */
- if (alist->parameter().type() == GainAutomation) {
+ if (alist->parameter().type() == GainAutomation ||
+ alist->parameter().type() == EnvelopeAutomation) {
y = gain_to_slider_position (y);
} else if (alist->parameter().type() == PanAutomation) {
// vertical coordinate axis reversal