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 authored and github-actions committed Nov 24, 2021
1 parent 448dcf3 commit a3d806fa203c15498b64c572749d1b3af7c5c41a
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 a3d806f

Please sign in to comment.