Skip to content
Permalink
Browse files

Show cannot pan WARNING for NULL geometry (#3255)

  • Loading branch information
tudorbarascu authored and m-kuhn committed Jun 29, 2016
1 parent 78569ab commit 50dd57d0c30d83c9571e7a59f7f7c7b96ecaaf2c
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsmapcanvas.cpp
@@ -1135,7 +1135,13 @@ void QgsMapCanvas::panToSelected( QgsVectorLayer* layer )

QgsRectangle rect = mapSettings().layerExtentToOutputExtent( layer, layer->boundingBoxOfSelected() );
if ( !rect.isNull() )
{
setCenter( rect.center() );
}
else
{
emit messageEmitted( tr( "Cannot pan to selected feature(s)" ), tr( "Geometry is NULL" ), QgsMessageBar::WARNING );
}
} // panToSelected

void QgsMapCanvas::keyPressEvent( QKeyEvent * e )

0 comments on commit 50dd57d

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