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 88fc149 commit 0bac4b86125b511f9022784eadcaca985ca7af38
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/qgsmapcanvas.cpp
@@ -934,7 +934,7 @@ QgsRectangle QgsMapCanvas::fullExtent() const
} // extent


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

@@ -1206,8 +1206,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 0bac4b8

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