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
2 people authored and 3nids committed Mar 29, 2021
1 parent 390686f commit d856156
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsabstractrelationeditorwidget.cpp
Expand Up @@ -221,7 +221,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 @@ -263,7 +263,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 d856156

Please sign in to comment.