diff options
author | Carl Hetherington <carl@carlh.net> | 2012-05-31 17:07:47 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-05-31 17:07:47 +0000 |
commit | d4af4d99e946d094e45c0463f7ba159802640478 (patch) | |
tree | 7196004df5d37ac9528810383c73947f80d97cbe /gtk2_ardour/automation_line.cc | |
parent | 650f16620d270523aee04b15419dc9d667042928 (diff) |
Remove suspect pixel-based control point x position clamping; this may cause issues in libart, so may need reverting.
git-svn-id: svn://localhost/ardour2/branches/3.0@12504 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 54755d36c5..7e72d3e7d4 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -495,30 +495,9 @@ AutomationLine::drag_motion (double x, float fraction, bool ignore_x, bool with_ /* clamp x */ for (list<ControlPoint*>::iterator i = points.begin(); i != points.end(); ++i) { - if ((*i)->can_slide() && !ignore_x) { - - /* clamp min x */ - double const a = (*i)->get_x() + dx; - double const b = before_x + 1; - if (a < b) { - dx += b - a; - } - - /* clamp max x */ - if (after) { - - if (after_x - before_x < 2) { - /* after and before are very close, so just leave this alone */ - dx = 0; - } else { - double const a = (*i)->get_x() + dx; - double const b = after_x - 1; - if (a > b) { - dx -= a - b; - } - } - } + x = max (x, before_x); + x = min (x, after_x); } } |