13
0

enforce a minimum 5x5 pixel size for the rubber band rect

This commit is contained in:
Paul Davis 2014-01-02 09:44:15 -05:00
parent e7c4774728
commit c460bf527e

View File

@ -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();