line->set_steps (line_points, is_stepped());
}
}
-
+ double const result_frac = _last_drag_fraction + dy;
_drag_distance += dx;
_drag_x += dx;
- _last_drag_fraction = fraction;
+ _last_drag_fraction = result_frac;
did_push = with_push;
- return pair<double, float> (_drag_x + dx, fraction);
+ return pair<double, float> (_drag_x + dx, result_frac);
}
/** Should be called to indicate the end of a drag */
if ( alist->parameter().type() == GainAutomation
|| alist->parameter().type() == EnvelopeAutomation
|| (_desc.logarithmic && _desc.lower == 0. && _desc.upper > _desc.lower)) {
- y = gain_to_slider_position_with_max (y, Config->get_max_gain());
+ y = gain_to_slider_position_with_max (y, _desc.upper);
} else if (alist->parameter().type() == TrimAutomation
|| (_desc.logarithmic && _desc.lower * _desc.upper > 0 && _desc.upper > _desc.lower)) {
const double lower_db = accurate_coefficient_to_dB (_desc.lower);