Skip to content

Commit 3bda98e

Browse files
author
homann
committed
Applied patch #1907, thanks!
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11533 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7fb3286 commit 3bda98e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/app/qgsmaptoolselect.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,16 @@ void QgsMapToolSelect::canvasReleaseEvent( QMouseEvent * e )
101101
{
102102
delete mRubberBand;
103103
mRubberBand = 0;
104-
// store the rectangle
105-
mSelectRect.setRight( e->pos().x() );
106-
mSelectRect.setBottom( e->pos().y() );
104+
105+
// Set valid values for rectangle's width and height
106+
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+
}
107114
}
108115

109116
mDragging = FALSE;

0 commit comments

Comments
 (0)