Skip to content
Permalink
Browse files
Preserve data types for default values
when they are created in the attribute dialog
Fixes #46158
  • Loading branch information
m-kuhn committed Nov 23, 2021
1 parent a21530b commit 82648ab7aef44d007d96700ba2af0800cc9cfc6a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgsattributeform.cpp
@@ -551,7 +551,7 @@ void QgsAttributeForm::updateValuesDependenciesDefaultValues( const int originId
continue;

QgsExpressionContext context = createExpressionContext( updatedFeature );
QString value = mLayer->defaultValue( eww->fieldIdx(), updatedFeature, &context ).toString();
const QVariant value = mLayer->defaultValue( eww->fieldIdx(), updatedFeature, &context );
eww->setValue( value );
}
}

0 comments on commit 82648ab

Please sign in to comment.