Skip to content
Permalink
Browse files

Set the expression context for map canvas renders

  • Loading branch information
nyalldawson committed Aug 22, 2015
1 parent 0cab6b3 commit cf22025860580d87bd12f7e1a32d662d9e2b6ea8
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsmapcanvas.cpp
@@ -661,6 +661,12 @@ void QgsMapCanvas::refreshMap()
//update $map variable to canvas
QgsExpression::setSpecialColumn( "$map", tr( "canvas" ) );

//build the expression context
QgsExpressionContext expressionContext;
expressionContext << QgsExpressionContextUtils::globalScope()
<< QgsExpressionContextUtils::projectScope();
mSettings.setExpressionContext( expressionContext );

// create the renderer job
Q_ASSERT( mJob == 0 );
mJobCancelled = false;

0 comments on commit cf22025

Please sign in to comment.
You can’t perform that action at this time.