Skip to content
Permalink
Browse files

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

…dget (#35272)
  • Loading branch information
3nids committed Mar 25, 2020
1 parent a8c5e1d commit e7238009382456222f247a466e3a4a70e614e901
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 e723800

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