diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-02 09:53:53 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-02 09:53:53 -0500 |
commit | b1d1473ddf319d33681d4b057c512d9cdf400961 (patch) | |
tree | 05f2f4435af57aa103111b3faeebfe50bb47a6d8 /gtk2_ardour | |
parent | c460bf527eb21429457b659ce26004eeeb81fa29 (diff) |
change min dimension of rubberband rect to 2 pixels
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 9 |
1 files 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); |