We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 7466544 commit f9f683dCopy full SHA for f9f683d
src/gui/qgsmapcanvasannotationitem.cpp
@@ -120,13 +120,20 @@ void QgsMapCanvasAnnotationItem::updateBoundingRect()
120
121
void QgsMapCanvasAnnotationItem::onCanvasLayersChanged()
122
{
123
- if ( !mAnnotation->mapLayer() )
+ if ( !mMapCanvas->annotationsVisible() )
124
125
- setVisible( true );
+ setVisible( false );
126
}
127
else
128
129
- setVisible( mMapCanvas->mapSettings().layers().contains( mAnnotation->mapLayer() ) );
+ if ( !mAnnotation->mapLayer() )
130
+ {
131
+ setVisible( true );
132
+ }
133
+ else
134
135
+ setVisible( mMapCanvas->mapSettings().layers().contains( mAnnotation->mapLayer() ) );
136
137
138
139
0 commit comments