Skip to content
Permalink
Browse files
Merge pull request #5577 from m-kuhn/valuerelref
Fix value() method of relation reference widget
  • Loading branch information
m-kuhn committed Nov 9, 2017
2 parents 8abc892 + b1ac56b commit 9f65fcd0d9293178bb9348f260aad0a12eef69cf
Showing 1 changed file with 1 addition and 12 deletions.
@@ -357,18 +357,7 @@ QVariant QgsRelationReferenceWidget::foreignKey() const
}
else
{
if ( mReferencingFieldIdx < 0 || mReferencingFieldIdx >= mReferencingLayer->fields().count() )
{
return QVariant();
}
else if ( !mFeature.isValid() )
{
return QVariant( mReferencingLayer->fields().at( mReferencingFieldIdx ).type() );
}
else
{
return mFeature.attribute( mReferencedFieldIdx );
}
return mComboBox->identifierValue();
}
}

0 comments on commit 9f65fcd

Please sign in to comment.