Skip to content
Permalink
Browse files

Fix zoom last needs two clicks to reset view for zoom tool

(fix #13095)

(cherry-picked from b50c603)
  • Loading branch information
nyalldawson committed Jul 11, 2015
1 parent 56613cc commit 174dca2c9782ff8f9b4f230dfb7c6d97073d0348
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/gui/qgsmaptoolzoom.cpp
@@ -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();
}

0 comments on commit 174dca2

Please sign in to comment.
You can’t perform that action at this time.