Skip to content
Permalink
Browse files

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

…dget (#35329)

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 f3a4826 commit 05ebfa6daddb07cf741ad9868e8010bee3d001fc
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.cpp
@@ -76,7 +76,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 05ebfa6

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