Skip to content

Commit

Permalink
Export only non-generated relations
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Jan 18, 2021
1 parent 371534c commit b9f73e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core/vector/qgsvectorlayer.cpp
Expand Up @@ -2640,7 +2640,10 @@ bool QgsVectorLayer::writeSymbology( QDomNode &node, QDomDocument &doc, QString
const auto constReferencingRelations { QgsProject::instance()->relationManager()->referencingRelations( this ) };
for ( const auto &rel : constReferencingRelations )
{
QgsWeakRelation::writeXml( this, QgsWeakRelation::Referencing, rel, referencedLayersElement, doc );
if ( rel.polymorphicRelationId().isNull() )
{
QgsWeakRelation::writeXml( this, QgsWeakRelation::Referencing, rel, referencedLayersElement, doc );
}
}

// Store referencing layers: relations where "this" is the parent layer (the referenced part, that holds the FK)
Expand All @@ -2650,7 +2653,10 @@ bool QgsVectorLayer::writeSymbology( QDomNode &node, QDomDocument &doc, QString
const auto constReferencedRelations { QgsProject::instance()->relationManager()->referencedRelations( this ) };
for ( const auto &rel : constReferencedRelations )
{
QgsWeakRelation::writeXml( this, QgsWeakRelation::Referenced, rel, referencingLayersElement, doc );
if ( rel.polymorphicRelationId().isNull() )
{
QgsWeakRelation::writeXml( this, QgsWeakRelation::Referenced, rel, referencingLayersElement, doc );
}
}

}
Expand Down

0 comments on commit b9f73e7

Please sign in to comment.