Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[qgsquick][annotations] Render projects' main annotation layer
  • Loading branch information
nirvn committed Sep 11, 2021
1 parent 6d5d8e8 commit b46854a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/quickgui/qgsquickmapcanvasmap.cpp
Expand Up @@ -24,6 +24,7 @@
#include "qgsmessagelog.h"
#include "qgspallabeling.h"
#include "qgsproject.h"
#include "qgsannotationlayer.h"
#include "qgsvectorlayer.h"
#include "qgslabelingresults.h"

Expand Down Expand Up @@ -112,6 +113,11 @@ void QgsQuickMapCanvasMap::refreshMap()
expressionContext << QgsExpressionContextUtils::projectScope( project );

mapSettings.setLabelingEngineSettings( project->labelingEngineSettings() );

// render main annotation layer above all other layers
QList<QgsMapLayer *> allLayers = mapSettings.layers();
allLayers.insert( 0, project->mainAnnotationLayer() );
mapSettings.setLayers( allLayers );
}

mapSettings.setExpressionContext( expressionContext );
Expand Down

0 comments on commit b46854a

Please sign in to comment.