Skip to content

Commit

Permalink
Update for changes in API
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 7, 2017
1 parent c6d939f commit 90d6a2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitemmap.cpp
Expand Up @@ -1034,7 +1034,7 @@ QgsExpressionContext QgsLayoutItemMap::createExpressionContext() const
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent" ), QVariant::fromValue( QgsGeometry::fromRect( currentExtent ) ), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent_width" ), currentExtent.width(), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent_height" ), currentExtent.height(), true ) );
QgsGeometry centerPoint = QgsGeometry::fromPoint( currentExtent.center() );
QgsGeometry centerPoint = QgsGeometry::fromPointXY( currentExtent.center() );
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent_center" ), QVariant::fromValue( centerPoint ), true ) );

QgsCoordinateReferenceSystem mapCrs = crs();
Expand Down

0 comments on commit 90d6a2d

Please sign in to comment.