Skip to content

Commit df49538

Browse files
author
Sandro Santilli
committedJan 3, 2015
Fix select by rectangle and by point in presence of rotation
Closes http://hub.qgis.org/issues/11865 and http://hub.qgis.org/issues/11930
1 parent d726959 commit df49538

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/app/qgsmaptoolselectutils.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@ void QgsMapToolSelectUtils::setRubberBand( QgsMapCanvas* canvas, QRect& selectRe
4949
{
5050
const QgsMapToPixel* transform = canvas->getCoordinateTransform();
5151
QgsPoint ll = transform->toMapCoordinates( selectRect.left(), selectRect.bottom() );
52+
QgsPoint lr = transform->toMapCoordinates( selectRect.right(), selectRect.bottom() );
53+
QgsPoint ul = transform->toMapCoordinates( selectRect.left(), selectRect.top() );
5254
QgsPoint ur = transform->toMapCoordinates( selectRect.right(), selectRect.top() );
5355

5456
if ( rubberBand )
5557
{
5658
rubberBand->reset( QGis::Polygon );
5759
rubberBand->addPoint( ll, false );
58-
rubberBand->addPoint( QgsPoint( ur.x(), ll.y() ), false );
60+
rubberBand->addPoint( lr, false );
5961
rubberBand->addPoint( ur, false );
60-
rubberBand->addPoint( QgsPoint( ll.x(), ur.y() ), true );
62+
rubberBand->addPoint( ul, true );
6163
}
6264
}
6365

0 commit comments

Comments
 (0)
Please sign in to comment.