Skip to content

Commit

Permalink
Fix zoom tool doesn't work from bottom right to top left (fix #12614)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 28, 2015
1 parent eee1ce1 commit bfa9f1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsmaptoolzoom.cpp
Expand Up @@ -103,6 +103,9 @@ void QgsMapToolZoom::canvasReleaseEvent( QMouseEvent * e )
mZoomRect.setRight( e->pos().x() );
mZoomRect.setBottom( e->pos().y() );

//account for bottom right -> top left dragging
mZoomRect = mZoomRect.normalized();

// set center and zoom
const QSize& zoomRectSize = mZoomRect.size();
const QgsMapSettings& mapSettings = mCanvas->mapSettings();
Expand Down

0 comments on commit bfa9f1c

Please sign in to comment.