Skip to content
Permalink
Browse files

Apply suggestions from code review

Co-authored-by: Ivan Ivanov <suricactus@users.noreply.github.com>
  • Loading branch information
domi4484 and suricactus committed Mar 16, 2021
1 parent 3f2a87c commit ae6aeeaf3d892c5ab2c86bd3abdea1f8b9d0195b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsabstractrelationeditorwidget.cpp
@@ -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
@@ -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;
}

0 comments on commit ae6aeea

Please sign in to comment.