Skip to content
Permalink
Browse files

Modernize

  • Loading branch information
m-kuhn authored and signedav committed Sep 5, 2018
1 parent a780feb commit 35898f9f0e28afbc8620bd8ca9439f97c631f329
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/app/qgsattributesformproperties.cpp
@@ -354,7 +354,8 @@ void QgsAttributesFormProperties::loadAttributeRelationEdit()

QgsRelation relation = QgsProject::instance()->relationManager()->relation( currentItem->data( 0, FieldNameRole ).toString() );

Q_FOREACH ( const QgsRelation &nmrel, QgsProject::instance()->relationManager()->referencingRelations( relation.referencingLayer() ) )
const QList<QgsRelation> relations = QgsProject::instance()->relationManager()->referencingRelations( relation.referencingLayer() );
for ( const QgsRelation &nmrel : relations )
{
if ( nmrel.fieldPairs().at( 0 ).referencingField() != relation.fieldPairs().at( 0 ).referencingField() )
mAttributeRelationEdit->setCardinalityCombo( QStringLiteral( "%1 (%2)" ).arg( nmrel.referencedLayer()->name(), nmrel.fieldPairs().at( 0 ).referencedField() ), nmrel.id() );

0 comments on commit 35898f9

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