[QGIS Commit] r11533 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Aug 31 07:03:31 EDT 2009
Author: homann
Date: 2009-08-31 07:03:29 -0400 (Mon, 31 Aug 2009)
New Revision: 11533
Modified:
trunk/qgis/src/app/qgsmaptoolselect.cpp
Log:
Applied patch #1907, thanks!
Modified: trunk/qgis/src/app/qgsmaptoolselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolselect.cpp 2009-08-31 10:17:58 UTC (rev 11532)
+++ trunk/qgis/src/app/qgsmaptoolselect.cpp 2009-08-31 11:03:29 UTC (rev 11533)
@@ -101,9 +101,16 @@
{
delete mRubberBand;
mRubberBand = 0;
- // store the rectangle
- mSelectRect.setRight( e->pos().x() );
- mSelectRect.setBottom( e->pos().y() );
+
+ // Set valid values for rectangle's width and height
+ if ( mSelectRect.width() == 1 )
+ {
+ mSelectRect.setLeft( mSelectRect.left() + 1 );
+ }
+ if ( mSelectRect.height() == 1 )
+ {
+ mSelectRect.setBottom( mSelectRect.bottom() + 1 );
+ }
}
mDragging = FALSE;
More information about the QGIS-commit
mailing list