@@ -429,7 +429,8 @@ void QgsExpressionContext::setOriginalValueVariable( const QVariant &value )
429
429
if ( mStack .isEmpty () )
430
430
mStack .append ( new QgsExpressionContextScope () );
431
431
432
- mStack .last ()->setVariable ( QgsExpressionContext::EXPR_ORIGINAL_VALUE, value );
432
+ mStack .last ()->addVariable ( QgsExpressionContextScope::StaticVariable ( QgsExpressionContext::EXPR_ORIGINAL_VALUE,
433
+ value, true ) );
433
434
}
434
435
435
436
@@ -711,8 +712,8 @@ QgsExpressionContextScope* QgsExpressionContextUtils::mapSettingsScope( const Qg
711
712
scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_id" , " canvas" , true ) );
712
713
scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_rotation" , mapSettings.rotation (), true ) );
713
714
scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_scale" , mapSettings.scale (), true ) );
714
- scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_width" , mapSettings.extent ().width () ) );
715
- scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_height" , mapSettings.extent ().height () ) );
715
+ scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_width" , mapSettings.extent ().width (), true ) );
716
+ scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_height" , mapSettings.extent ().height (), true ) );
716
717
QgsGeometry* centerPoint = QgsGeometry::fromPoint ( mapSettings.visibleExtent ().center () );
717
718
scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_center" , QVariant::fromValue ( *centerPoint ), true ) );
718
719
delete centerPoint;
0 commit comments