mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix new annotations are shown even when annotations are hidden
Fixes #19117
This commit is contained in:
parent
746654429c
commit
f9f683dbd0
@ -120,13 +120,20 @@ void QgsMapCanvasAnnotationItem::updateBoundingRect()
|
||||
|
||||
void QgsMapCanvasAnnotationItem::onCanvasLayersChanged()
|
||||
{
|
||||
if ( !mAnnotation->mapLayer() )
|
||||
if ( !mMapCanvas->annotationsVisible() )
|
||||
{
|
||||
setVisible( true );
|
||||
setVisible( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
setVisible( mMapCanvas->mapSettings().layers().contains( mAnnotation->mapLayer() ) );
|
||||
if ( !mAnnotation->mapLayer() )
|
||||
{
|
||||
setVisible( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
setVisible( mMapCanvas->mapSettings().layers().contains( mAnnotation->mapLayer() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user