Skip to content
Permalink
Browse files

keep old value when asked to set an invalid value in relation ref widget

  • Loading branch information
SebDieBln committed Feb 25, 2016
1 parent 5f157a9 commit cc19a578181807a7394d3dfdc36d8008380aa572
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -234,7 +234,11 @@ void QgsRelationReferenceWidget::setRelationEditable( bool editable )

void QgsRelationReferenceWidget::setForeignKey( const QVariant& value )
{
if ( !value.isValid() || value.isNull() )
if ( !value.isValid() )
{
return;
}
if ( value.isNull() )
{
deleteForeignKey();
return;
@@ -254,7 +258,6 @@ void QgsRelationReferenceWidget::setForeignKey( const QVariant& value )

if ( !mFeature.isValid() )
{
deleteForeignKey();
return;
}

0 comments on commit cc19a57

Please sign in to comment.
You can’t perform that action at this time.