We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fb3286 commit 3bda98eCopy full SHA for 3bda98e
src/app/qgsmaptoolselect.cpp
@@ -101,9 +101,16 @@ void QgsMapToolSelect::canvasReleaseEvent( QMouseEvent * e )
101
{
102
delete mRubberBand;
103
mRubberBand = 0;
104
- // store the rectangle
105
- mSelectRect.setRight( e->pos().x() );
106
- mSelectRect.setBottom( e->pos().y() );
+
+ // Set valid values for rectangle's width and height
+ if ( mSelectRect.width() == 1 )
107
+ {
108
+ mSelectRect.setLeft( mSelectRect.left() + 1 );
109
+ }
110
+ if ( mSelectRect.height() == 1 )
111
112
+ mSelectRect.setBottom( mSelectRect.bottom() + 1 );
113
114
}
115
116
mDragging = FALSE;
0 commit comments