Skip to content
Permalink
Browse files
[qgsquick][annotations] Render projects' main annotation layer
  • Loading branch information
nirvn committed Sep 11, 2021
1 parent 6d5d8e8 commit b46854adf6b90a3b408997f17c2a5b2d6dbbf34a
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/quickgui/qgsquickmapcanvasmap.cpp
@@ -24,6 +24,7 @@
#include "qgsmessagelog.h"
#include "qgspallabeling.h"
#include "qgsproject.h"
#include "qgsannotationlayer.h"
#include "qgsvectorlayer.h"
#include "qgslabelingresults.h"

@@ -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 );

0 comments on commit b46854a

Please sign in to comment.