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
This commit is contained in:
Carl Hetherington
2011-04-23 00:03:17 +00:00
parent 1d5cc25d94
commit dd5d994367

View File

@@ -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 */