Stop automation drags when they hit their lowest point, so as to prevent automation curves being lost by dragging things too far downwards.
git-svn-id: svn://localhost/ardour2/branches/3.0@6434 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
85d0894475
commit
9a6532def2
@ -767,10 +767,17 @@ AutomationLine::drag_motion (nframes_t x, float fraction, bool with_push)
|
||||
drag_distance += dx;
|
||||
drag_x = x;
|
||||
|
||||
double const dy = fraction - _last_drag_fraction;
|
||||
|
||||
double dy = fraction - _last_drag_fraction;
|
||||
_last_drag_fraction = fraction;
|
||||
|
||||
/* clamp y so that the "lowest" point hits the bottom but goes no further */
|
||||
for (list<ControlPoint*>::iterator i = _drag_points.begin(); i != _drag_points.end(); ++i) {
|
||||
double const y = ((_height - (*i)->get_y()) / _height) + dy;
|
||||
if (y < 0) {
|
||||
dy -= y;
|
||||
}
|
||||
}
|
||||
|
||||
for (list<ControlPoint*>::iterator i = _drag_points.begin(); i != _drag_points.end(); ++i) {
|
||||
|
||||
modify_view_point (
|
||||
|
Loading…
Reference in New Issue
Block a user