Skip to content

Commit

Permalink
Store relative publicSource when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Nov 27, 2019
1 parent 37c42c3 commit daeae76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -213,7 +213,7 @@ void QgsRelationReferenceWidget::setRelation( const QgsRelation &relation, bool
{
mReferencedLayerId = relation.referencedLayerId();
mReferencedLayerName = relation.referencedLayer()->name();
mReferencedLayerDataSource = relation.referencedLayer()->publicSource();
setReferencedLayerDataSource( relation.referencedLayer()->publicSource() );
mReferencedLayerProviderKey = relation.referencedLayer()->providerType();
mInvalidLabel->hide();

Expand Down Expand Up @@ -1127,7 +1127,8 @@ QString QgsRelationReferenceWidget::referencedLayerDataSource() const

void QgsRelationReferenceWidget::setReferencedLayerDataSource( const QString &relationDataSource )
{
mReferencedLayerDataSource = relationDataSource;
const QgsPathResolver resolver { QgsProject::instance()->pathResolver() };
mReferencedLayerDataSource = resolver.writePath( relationDataSource );
}

void QgsRelationReferenceWidget::setFormFeature( const QgsFeature &formFeature )
Expand Down

0 comments on commit daeae76

Please sign in to comment.