Navigation Menu

Skip to content

Commit

Permalink
Preserve data types for default values
Browse files Browse the repository at this point in the history
when they are created in the attribute dialog
Fixes #46158
  • Loading branch information
m-kuhn committed Nov 23, 2021
1 parent a21530b commit 82648ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsattributeform.cpp
Expand Up @@ -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 );
}
}
Expand Down

0 comments on commit 82648ab

Please sign in to comment.