Skip to content

Commit

Permalink
Fix zoom last needs two clicks to reset view for zoom tool
Browse files Browse the repository at this point in the history
(fix #13095)

(cherry-picked from b50c603)
  • Loading branch information
nyalldawson committed Jul 11, 2015
1 parent 6a206d8 commit 388d339
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gui/qgsmaptoolzoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ void QgsMapToolZoom::canvasReleaseEvent( QMouseEvent * e )
const QgsMapToPixel* m2p = mCanvas->getCoordinateTransform();
QgsPoint c = m2p->toMapCoordinates( mZoomRect.center() );

mCanvas->setCenter( c );
mCanvas->zoomByFactor( mZoomOut ? 1.0 / sf : sf );
mCanvas->zoomByFactor( mZoomOut ? 1.0 / sf : sf, &c );

mCanvas->refresh();
}
Expand Down

0 comments on commit 388d339

Please sign in to comment.