Skip to content

Commit a5ab4e1

Browse files
committed
Restore shape atlas handling
1 parent e72e20b commit a5ab4e1

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/app/layout/qgslayoutshapewidget.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ QgsLayoutShapeWidget::QgsLayoutShapeWidget( QgsLayoutItemShape *shape )
6060
connect( mShapeStyleButton, &QgsSymbolButton::changed, this, &QgsLayoutShapeWidget::symbolChanged );
6161
connect( mRadiusUnitsComboBox, &QgsLayoutUnitsComboBox::changed, this, &QgsLayoutShapeWidget::radiusUnitsChanged );
6262

63-
#if 0 //TODO
64-
mShapeStyleButton->setLayer( atlasCoverageLayer() );
65-
#endif
63+
mShapeStyleButton->setLayer( coverageLayer() );
64+
if ( mShape->layout() )
65+
{
66+
connect( &mShape->layout()->context(), &QgsLayoutContext::layerChanged, mShapeStyleButton, &QgsSymbolButton::setLayer );
67+
}
6668
}
6769

6870
bool QgsLayoutShapeWidget::setNewItem( QgsLayoutItem *item )

src/core/layout/qgslayoutitemshape.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@ QgsLayoutItemShape::QgsLayoutItemShape( QgsLayout *layout )
4343
updateBoundingRect();
4444
update();
4545
} );
46-
47-
#if 0 //TODO
48-
if ( mComposition )
49-
{
50-
//connect to atlas feature changes
51-
//to update symbol style (in case of data-defined symbology)
52-
connect( &mComposition->atlasComposition(), &QgsAtlasComposition::featureChanged, this, &QgsComposerItem::repaint );
53-
}
54-
#endif
5546
}
5647

5748
int QgsLayoutItemShape::type() const

0 commit comments

Comments
 (0)