diff options
author | Carl Hetherington <carl@carlh.net> | 2011-04-23 00:03:17 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-04-23 00:03:17 +0000 |
commit | dd5d994367798c3d709415a421f07ac2507b2cf7 (patch) | |
tree | 1433103ccd7d1840e1987d767e8e48108512e880 | |
parent | 1d5cc25d94650f5e2e656ce7cd24ae5fea2ae6fc (diff) |
Prevent the point selection straying -ve when control points are positioned close to 0 (should fix #3861).
git-svn-id: svn://localhost/ardour2/branches/3.0@9412 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/selection.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index f734d07375..82cdad5f33 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1088,9 +1088,9 @@ Selection::set_point_selection_from_line (AutomationLine const & line) double const x_size = line.time_converter().from (line.trackview.editor().pixel_to_frame (size)); double const y_size = size / line.trackview.current_height (); - double const x1 = x - x_size / 2; + double const x1 = max (0.0, x - x_size / 2); double const x2 = x + x_size / 2; - double const y1 = y - y_size / 2; + double const y1 = max (0.0, y - y_size / 2); double const y2 = y + y_size / 2; /* extend the current AutomationRange to put this point in */ |