Skip to content
Permalink
Browse files

Merge pull request #42782 from nirvn/updatefeature_fix

[vectorlayer] Fix updateFeature() when an attribute's variant goes from null to default null value
  • Loading branch information
m-kuhn committed Apr 13, 2021
2 parents bcd4ebc + 623334a commit 48caf7178a90c44491cfb19df790127a5f27fa60
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/vector/qgsvectorlayer.cpp
@@ -1072,7 +1072,7 @@ bool QgsVectorLayer::updateFeature( QgsFeature &updatedFeature, bool skipDefault

for ( int attr = 0; attr < fa.count(); ++attr )
{
if ( fa.at( attr ) != ca.at( attr ) )
if ( !qgsVariantEqual( fa.at( attr ), ca.at( attr ) ) )
{
if ( changeAttributeValue( updatedFeature.id(), attr, fa.at( attr ), ca.at( attr ), true ) )
{

0 comments on commit 48caf71

Please sign in to comment.