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
1 changed files with 11 additions and 0 deletions

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