Skip to content
Permalink
Browse files

Minor code cleanups for composer attribute table widget

  • Loading branch information
nyalldawson committed Oct 19, 2014
1 parent 7773d4e commit 0c4e8e6436ee41475ace1ed0ff9dfe1061cb2c1c
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/app/composer/qgscomposerattributetablewidget.cpp
@@ -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 );
}

0 comments on commit 0c4e8e6

Please sign in to comment.
You can’t perform that action at this time.