Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Ivanov <suricactus@users.noreply.github.com>
  • Loading branch information
domi4484 and suricactus committed Mar 16, 2021
1 parent 3f2a87c commit ae6aeea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsabstractrelationeditorwidget.cpp
Expand Up @@ -216,7 +216,7 @@ void QgsAbstractRelationEditorWidget::addFeature( const QgsGeometry &geometry )
// n:m Relation: first let the user create a new feature on the other table
// and autocreate a new linking feature.
QgsFeature f;
if ( vlTools->addFeature( mNmRelation.referencedLayer(), QgsAttributeMap(), geometry, &f ) == false )
if ( !vlTools->addFeature( mNmRelation.referencedLayer(), QgsAttributeMap(), geometry, &f ) )
return;

// Fields of the linking table
Expand Down Expand Up @@ -258,7 +258,7 @@ void QgsAbstractRelationEditorWidget::addFeature( const QgsGeometry &geometry )
keyAttrs.insert( fields.indexFromName( fieldPair.referencingField() ), mFeature.attribute( fieldPair.referencedField() ) );
}

if ( vlTools->addFeature( mRelation.referencingLayer(), keyAttrs, geometry ) == false )
if ( !vlTools->addFeature( mRelation.referencingLayer(), keyAttrs, geometry ) )
return;
}

Expand Down

0 comments on commit ae6aeea

Please sign in to comment.