Skip to content

Commit

Permalink
[layouts] Fix rendering of dynamic map grids when exporting atlas out…
Browse files Browse the repository at this point in the history
…side of layout designer
  • Loading branch information
nirvn committed Aug 19, 2021
1 parent 8bc9098 commit 2c5c9b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/layout/qgslayoutitemmapgrid.cpp
Expand Up @@ -1948,6 +1948,13 @@ void QgsLayoutItemMapGrid::refreshDataDefinedProperties()
{
const 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 )
{
Expand Down Expand Up @@ -1975,6 +1982,7 @@ void QgsLayoutItemMapGrid::refreshDataDefinedProperties()
const double interval = QgsLayoutUtils::calculatePrettySize( minUnitsPerSeg, maxUnitsPerSeg );
mEvaluatedIntervalX = interval;
mEvaluatedIntervalY = interval;
mTransformDirty = true;
}
break;
}
Expand Down

0 comments on commit 2c5c9b6

Please sign in to comment.