Skip to content

Commit

Permalink
Fix value() method of relation reference widget
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 9, 2017
1 parent 8abc892 commit b1ac56b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit b1ac56b

Please sign in to comment.