Skip to content

Commit

Permalink
Don't even attempt to show a map tip for a non-spatial layer
Browse files Browse the repository at this point in the history
(cherry picked from commit 1653485)
  • Loading branch information
nyalldawson committed Jan 15, 2021
1 parent 78f0903 commit 5a9cd1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsmaptip.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 5a9cd1f

Please sign in to comment.