Skip to content

Commit b1ac56b

Browse files
committedNov 9, 2017
Fix value() method of relation reference widget
1 parent 8abc892 commit b1ac56b

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)
Please sign in to comment.