Skip to content
Permalink
Browse files

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

(fix #13095)
  • Loading branch information
nyalldawson committed Jul 11, 2015
1 parent bf6f62c commit b50c603e47bb330b1ea69efaef4a747a8def5389
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 b50c603

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