Skip to content
Permalink
Browse files
[layouts] Fix rendering of dynamic map grids when exporting atlas out…
…side of layout designer
  • Loading branch information
nirvn authored and github-actions committed Aug 19, 2021
1 parent 9dd9934 commit 238f513e4045cb0bf1fda1e22a5ff5009eee4e01
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/layout/qgslayoutitemmapgrid.cpp
@@ -1948,6 +1948,13 @@ void QgsLayoutItemMapGrid::refreshDataDefinedProperties()
{
QgsExpressionContext context = createExpressionContext();

// if we are changing the grid interval or offset, then we also have to mark the transform as dirty
mTransformDirty = mTransformDirty
|| mDataDefinedProperties.isActive( QgsLayoutObject::MapGridIntervalX )
|| mDataDefinedProperties.isActive( QgsLayoutObject::MapGridIntervalY )
|| mDataDefinedProperties.isActive( QgsLayoutObject::MapGridOffsetX )
|| mDataDefinedProperties.isActive( QgsLayoutObject::MapGridOffsetY );

mEvaluatedEnabled = mDataDefinedProperties.valueAsBool( QgsLayoutObject::MapGridEnabled, context, enabled() );
switch ( mGridUnit )
{
@@ -1975,6 +1982,7 @@ void QgsLayoutItemMapGrid::refreshDataDefinedProperties()
const double interval = QgsLayoutUtils::calculatePrettySize( minUnitsPerSeg, maxUnitsPerSeg );
mEvaluatedIntervalX = interval;
mEvaluatedIntervalY = interval;
mTransformDirty = true;
}
break;
}

0 comments on commit 238f513

Please sign in to comment.