Skip to content

Commit

Permalink
Minor code cleanups for composer attribute table widget
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 19, 2014
1 parent 7773d4e commit 0c4e8e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/composer/qgscomposerattributetablewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,14 +565,17 @@ void QgsComposerAttributeTableWidget::updateRelationsCombo()
QgsVectorLayer* atlasLayer = atlasCoverageLayer();
if ( atlasLayer )
{
QList<QgsRelation> relations = QgsProject::instance()->relationManager()->referencedRelations( mComposerTable->composition()->atlasComposition().coverageLayer() );
QList<QgsRelation> relations = QgsProject::instance()->relationManager()->referencedRelations( atlasLayer );
Q_FOREACH ( const QgsRelation& relation, relations )
{
mRelationsComboBox->addItem( relation.name(), relation.id() );
}
if ( mComposerTable )
{
mRelationsComboBox->setCurrentIndex( mRelationsComboBox->findData( mComposerTable->relationId() ) );
}
}

mRelationsComboBox->setCurrentIndex( mRelationsComboBox->findData( mComposerTable->relationId() ) );
mRelationsComboBox->blockSignals( false );
}

Expand Down

0 comments on commit 0c4e8e6

Please sign in to comment.