Skip to content

Commit 787f1a6

Browse files
committed
[composer] Refresh attribute table filter when atlas feature changes (fix #10651)
1 parent cd3bdd7 commit 787f1a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/composer/qgscomposerattributetable.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ QgsComposerAttributeTable::QgsComposerAttributeTable( QgsComposition* compositio
121121
{
122122
//refresh table attributes when composition is refreshed
123123
connect( mComposition, SIGNAL( refreshItemsTriggered() ), this, SLOT( refreshAttributes() ) );
124+
125+
//connect to atlas feature changes to update table rows
126+
connect( &mComposition->atlasComposition(), SIGNAL( featureChanged( QgsFeature* ) ), this, SLOT( refreshAttributes() ) );
124127
}
125128
}
126129

@@ -405,7 +408,7 @@ bool QgsComposerAttributeTable::getFeatureAttributes( QList<QgsAttributeMap> &at
405408
if ( !selectionRect.isEmpty() )
406409
req.setFilterRect( selectionRect );
407410

408-
req.setFlags( mShowOnlyVisibleFeatures ? QgsFeatureRequest::ExactIntersect : QgsFeatureRequest::NoGeometry );
411+
req.setFlags( mShowOnlyVisibleFeatures ? QgsFeatureRequest::ExactIntersect : QgsFeatureRequest::NoFlags );
409412

410413
QgsFeature f;
411414
int counter = 0;

0 commit comments

Comments
 (0)