Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set the expression context for map canvas renders
  • Loading branch information
nyalldawson committed Aug 22, 2015
1 parent 0cab6b3 commit cf22025
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit cf22025

Please sign in to comment.