Skip to content
Permalink
Browse files

Show cannot pan WARNING for NULL geometry

  • Loading branch information
tudorbarascu authored and m-kuhn committed Jun 27, 2016
1 parent 8610175 commit eabdb656a2f152c6c04a9df8d533e8b9c3884199
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsmapcanvas.cpp
@@ -1207,7 +1207,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 )

1 comment on commit eabdb65

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids commented on eabdb65 Jun 15, 2017

there is the issue with zoomToSelected, I am on it

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