From b1d1473ddf319d33681d4b057c512d9cdf400961 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 2 Jan 2014 09:53:53 -0500 Subject: [PATCH] change min dimension of rubberband rect to 2 pixels --- gtk2_ardour/editor_drag.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 0c316725bc..f1809ec2bb 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3428,6 +3428,7 @@ RubberbandSelectDrag::motion (GdkEvent* event, bool) double x1 = _editor->sample_to_pixel (start); double x2 = _editor->sample_to_pixel (end); + const double min_dimension = 2.0; _editor->rubberband_rect->set_x0 (x1); if (_vertical_only) { @@ -3435,18 +3436,18 @@ RubberbandSelectDrag::motion (GdkEvent* event, bool) _editor->rubberband_rect->set_x1 (x1 + 10); } else { if (x2 < x1) { - x2 = min (x1 - 5, x2); + x2 = min (x1 - min_dimension, x2); } else { - x2 = max (x1 + 5, x2); + x2 = max (x1 + min_dimension, x2); } _editor->rubberband_rect->set_x1 (x2); } _editor->rubberband_rect->set_y0 (y1); if (y2 < y1) { - y2 = min (y1 - 5, y2); + y2 = min (y1 - min_dimension, y2); } else { - y2 = max (y1 + 5, y2); + y2 = max (y1 + min_dimension, y2); } _editor->rubberband_rect->set_y1 (y2);