From c460bf527eb21429457b659ce26004eeeb81fa29 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 2 Jan 2014 09:44:15 -0500 Subject: [PATCH] enforce a minimum 5x5 pixel size for the rubber band rect --- gtk2_ardour/editor_drag.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 5616b93ff4..0c316725bc 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3434,10 +3434,21 @@ RubberbandSelectDrag::motion (GdkEvent* event, bool) /* fixed 10 pixel width */ _editor->rubberband_rect->set_x1 (x1 + 10); } else { + if (x2 < x1) { + x2 = min (x1 - 5, x2); + } else { + x2 = max (x1 + 5, x2); + } _editor->rubberband_rect->set_x1 (x2); } _editor->rubberband_rect->set_y0 (y1); + if (y2 < y1) { + y2 = min (y1 - 5, y2); + } else { + y2 = max (y1 + 5, y2); + } + _editor->rubberband_rect->set_y1 (y2); _editor->rubberband_rect->show();