Skip to content
Permalink
Browse files

take another try to get a valid relation in the relation reference wi…

…dget (#35328)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
qgis-bot and github-actions committed Mar 25, 2020
1 parent a9462b6 commit 3ec7e8f2e5d8b359611fab94bb318f77c1488a05
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.cpp
@@ -70,7 +70,7 @@ void QgsRelationReferenceWidgetWrapper::initWidget( QWidget *editor )
QgsRelation relation; // invalid relation by default
if ( relationName.isValid() )
relation = QgsProject::instance()->relationManager()->relation( relationName.toString() );
else if ( ! layer()->referencingRelations( fieldIdx() ).isEmpty() )
if ( !relation.isValid() && !layer()->referencingRelations( fieldIdx() ).isEmpty() )
relation = layer()->referencingRelations( fieldIdx() )[0];

// If this widget is already embedded by the same relation, reduce functionality

0 comments on commit 3ec7e8f

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