Navigation Menu

Skip to content

Commit

Permalink
Avoid misleading debug output "Invalid relation: no ID"
Browse files Browse the repository at this point in the history
Set the relation ID at first to avoid debug messages
  • Loading branch information
domi4484 committed Mar 18, 2021
1 parent 168735f commit 7a59315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgspolymorphicrelation.cpp
Expand Up @@ -389,10 +389,10 @@ QList<QgsRelation> QgsPolymorphicRelation::generateRelations() const
QgsRelation relation;
QString referencedLayerName = d->mReferencedLayersMap[referencedLayerId]->name();

relation.setId( QStringLiteral( "%1_%2" ).arg( d->mRelationId, referencedLayerName ) );
relation.setReferencedLayer( referencedLayerId );
relation.setReferencingLayer( d->mReferencingLayerId );
relation.setName( QStringLiteral( "Generated for \"%1\"" ).arg( referencedLayerName ) );
relation.setId( QStringLiteral( "%1_%2" ).arg( d->mRelationId, referencedLayerName ) );
relation.setPolymorphicRelationId( d->mRelationId );
relation.setStrength( d->mRelationStrength );

Expand Down

0 comments on commit 7a59315

Please sign in to comment.