File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -565,14 +565,17 @@ void QgsComposerAttributeTableWidget::updateRelationsCombo()
565
565
QgsVectorLayer* atlasLayer = atlasCoverageLayer ();
566
566
if ( atlasLayer )
567
567
{
568
- QList<QgsRelation> relations = QgsProject::instance ()->relationManager ()->referencedRelations ( mComposerTable -> composition ()-> atlasComposition (). coverageLayer () );
568
+ QList<QgsRelation> relations = QgsProject::instance ()->relationManager ()->referencedRelations ( atlasLayer );
569
569
Q_FOREACH ( const QgsRelation& relation, relations )
570
570
{
571
571
mRelationsComboBox ->addItem ( relation.name (), relation.id () );
572
572
}
573
+ if ( mComposerTable )
574
+ {
575
+ mRelationsComboBox ->setCurrentIndex ( mRelationsComboBox ->findData ( mComposerTable ->relationId () ) );
576
+ }
573
577
}
574
578
575
- mRelationsComboBox ->setCurrentIndex ( mRelationsComboBox ->findData ( mComposerTable ->relationId () ) );
576
579
mRelationsComboBox ->blockSignals ( false );
577
580
}
578
581
You can’t perform that action at this time.
0 commit comments