Skip to content
Permalink
Browse files

Don't even attempt to show a map tip for a non-spatial layer

  • Loading branch information
nyalldawson committed Jan 4, 2021
1 parent 7206531 commit 83b50cd2a1552d8df5d427642e72507846d8a161
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgsmaptip.cpp
@@ -187,7 +187,7 @@ void QgsMapTip::clear( QgsMapCanvas * )
QString QgsMapTip::fetchFeature( QgsMapLayer *layer, QgsPointXY &mapPosition, QgsMapCanvas *mapCanvas )
{
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
if ( !vlayer )
if ( !vlayer || !vlayer->isSpatial() )
return QString();

double searchRadius = QgsMapTool::searchRadiusMU( mapCanvas );

0 comments on commit 83b50cd

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