From b4a95b1f82118eb1aa23be74c8af67e2afa349db Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Fri, 22 Nov 2024 15:49:45 -0300 Subject: [PATCH] if default value on update enabled, field always not editable --- app/attributes/attributecontroller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/attributes/attributecontroller.cpp b/app/attributes/attributecontroller.cpp index ed0f17b83..135319067 100644 --- a/app/attributes/attributecontroller.cpp +++ b/app/attributes/attributecontroller.cpp @@ -928,7 +928,7 @@ void AttributeController::recalculateDerivedItems( bool isFormValueChange, bool std::shared_ptr item = formItemsIterator.value(); QgsExpression exp = item->editableExpression(); - if ( !exp.expression().isEmpty() ) + if ( !exp.expression().isEmpty() && !item->field().defaultValueDefinition().applyOnUpdate() ) { bool editable = item->isEditable(); exp.prepare( &expressionContext );