File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -735,8 +735,8 @@ QgsExpressionContextScope* QgsExpressionContextUtils::mapSettingsScope( const Qg
735735 scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_id" , " canvas" , true ) );
736736 scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_rotation" , mapSettings.rotation (), true ) );
737737 scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_scale" , mapSettings.scale (), true ) );
738- scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_width" , mapSettings.extent ().width (), true ) );
739- scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_height" , mapSettings.extent ().height (), true ) );
738+ scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_width" , mapSettings.visibleExtent ().width (), true ) );
739+ scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_height" , mapSettings.visibleExtent ().height (), true ) );
740740 QgsGeometry* centerPoint = QgsGeometry::fromPoint ( mapSettings.visibleExtent ().center () );
741741 scope->addVariable ( QgsExpressionContextScope::StaticVariable ( " map_extent_center" , QVariant::fromValue ( *centerPoint ), true ) );
742742 delete centerPoint;
You can’t perform that action at this time.
0 commit comments