Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[maptips] do not render tips if the layer is not rendered
  • Loading branch information
nirvn committed Jul 19, 2018
1 parent 68290a2 commit 8f5d968
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/qgsmaptip.cpp
Expand Up @@ -57,6 +57,12 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,
// we only want the first qualifying feature and we will only display the
// field defined as the label field in the layer configuration file/database

// Do not render map tips if the layer is not visible
if ( !pMapCanvas->layers().contains( pLayer ) )
{
return;
}

// Show the maptip on the canvas
QString tipText, lastTipText, tipHtml, bodyStyle, containerStyle,
backgroundColor, strokeColor;
Expand Down

0 comments on commit 8f5d968

Please sign in to comment.