Skip to content

Commit

Permalink
Merge pull request #42782 from nirvn/updatefeature_fix
Browse files Browse the repository at this point in the history
[vectorlayer] Fix updateFeature() when an attribute's variant goes from null to default null value
  • Loading branch information
m-kuhn authored and github-actions[bot] committed Apr 13, 2021
1 parent f4bbede commit 2b0c1bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/vector/qgsvectorlayer.cpp
Expand Up @@ -1074,7 +1074,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 ) )
{
Expand Down

0 comments on commit 2b0c1bd

Please sign in to comment.