Skip to content
Permalink
Browse files

Don't lock canvas when trying to pan to null geometry

Fix #15122
  • Loading branch information
m-kuhn committed Jun 26, 2016
1 parent f3216bb commit 925d14b273179d10704abc4b57dca74daa9ffb0b
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/qgsmapcanvas.cpp
@@ -862,7 +862,7 @@ QgsRectangle QgsMapCanvas::fullExtent() const
} // extent


void QgsMapCanvas::setExtent( QgsRectangle const & r )
void QgsMapCanvas::setExtent( const QgsRectangle& r )
{
QgsRectangle current = extent();

@@ -1134,8 +1134,8 @@ void QgsMapCanvas::panToSelected( QgsVectorLayer* layer )
return;

QgsRectangle rect = mapSettings().layerExtentToOutputExtent( layer, layer->boundingBoxOfSelected() );
setExtent( QgsRectangle( rect.center(), rect.center() ) );
refresh();
if ( !rect.isNull() )
setCenter( rect.center() );
} // panToSelected

void QgsMapCanvas::keyPressEvent( QKeyEvent * e )

0 comments on commit 925d14b

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