From dd5d994367798c3d709415a421f07ac2507b2cf7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 23 Apr 2011 00:03:17 +0000 Subject: 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 --- gtk2_ardour/selection.cc | 4 ++-- 1 file 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 */ -- cgit v1.2.3