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)
  • Loading branch information
nyalldawson committed Jul 11, 2015
1 parent bf6f62c commit b50c603
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gui/qgsmaptoolzoom.cpp
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 b50c603

Please sign in to comment.