Skip to content

Commit 9f65fcd

Browse files
authored
Merge pull request #5577 from m-kuhn/valuerelref
Fix value() method of relation reference widget
2 parents 8abc892 + b1ac56b commit 9f65fcd

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/gui/editorwidgets/qgsrelationreferencewidget.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -357,18 +357,7 @@ QVariant QgsRelationReferenceWidget::foreignKey() const
357357
}
358358
else
359359
{
360-
if ( mReferencingFieldIdx < 0 || mReferencingFieldIdx >= mReferencingLayer->fields().count() )
361-
{
362-
return QVariant();
363-
}
364-
else if ( !mFeature.isValid() )
365-
{
366-
return QVariant( mReferencingLayer->fields().at( mReferencingFieldIdx ).type() );
367-
}
368-
else
369-
{
370-
return mFeature.attribute( mReferencedFieldIdx );
371-
}
360+
return mComboBox->identifierValue();
372361
}
373362
}
374363

0 commit comments

Comments
 (0)