Skip to content
Permalink
Browse files

Apply suggestions from code review

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 d856156a4b74f9db44256a4e85f0ea16cbcde26a
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsabstractrelationeditorwidget.cpp
@@ -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
@@ -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;
}

0 comments on commit d856156

Please sign in to comment.