Skip to content


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
Cherry-picked from bfa9f1c
  • Loading branch information
nyalldawson committed Jun 24, 2015
1 parent f659554 commit 8d5c9ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsmaptoolzoom.cpp
Original file line number Diff line number Diff line change
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 8d5c9ad

Please sign in to comment.