Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix value() method of relation reference widget
- Loading branch information
Showing
with
1 addition
and
12 deletions.
-
+1
−12
src/gui/editorwidgets/qgsrelationreferencewidget.cpp
|
@@ -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(); |
|
|
} |
|
|
} |
|
|
|
|
|