We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f157a9 commit cc19a57Copy full SHA for cc19a57
src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -234,7 +234,11 @@ void QgsRelationReferenceWidget::setRelationEditable( bool editable )
234
235
void QgsRelationReferenceWidget::setForeignKey( const QVariant& value )
236
{
237
- if ( !value.isValid() || value.isNull() )
+ if ( !value.isValid() )
238
+ {
239
+ return;
240
+ }
241
+ if ( value.isNull() )
242
243
deleteForeignKey();
244
return;
@@ -254,7 +258,6 @@ void QgsRelationReferenceWidget::setForeignKey( const QVariant& value )
254
258
255
259
if ( !mFeature.isValid() )
256
260
257
- deleteForeignKey();
261
262
}
263
0 commit comments