diff --git a/app/attributes/attributecontroller.cpp b/app/attributes/attributecontroller.cpp index 7e6ceb297..d0952b213 100644 --- a/app/attributes/attributecontroller.cpp +++ b/app/attributes/attributecontroller.cpp @@ -232,10 +232,11 @@ void AttributeController::flatten( QStringList expressions; QString expression = field.constraints().constraintExpression(); - // Retrieving field name/alias expression QgsEditFormConfig editFormConfig = layer->editFormConfig(); QString fieldName = field.name(); QgsPropertyCollection fieldProperties = editFormConfig.dataDefinedFieldProperties( fieldName ); + + // Retrieving field name expression QgsProperty nameProperty = fieldProperties.property( QgsEditFormConfig::DataDefinedProperty::Alias ); QString nameExpressionString = nameProperty.expressionString(); QgsExpression nameExpression( nameExpressionString ); @@ -948,7 +949,7 @@ void AttributeController::recalculateDerivedItems( bool isFormValueChange, bool } } - // Evaluate form items alias/name + // Evaluate form items name { QMap>::iterator formItemsIterator = mFormItems.begin(); while ( formItemsIterator != mFormItems.end() ) diff --git a/app/attributes/attributedata.cpp b/app/attributes/attributedata.cpp index 82488b184..847073455 100644 --- a/app/attributes/attributedata.cpp +++ b/app/attributes/attributedata.cpp @@ -37,7 +37,7 @@ FormItem::FormItem( const QUuid &id, , mParentTabId( parentTabId ) , mType( type ) , mName( name ) - , mNameExpression( nameExpression ) //mNameExpression + , mNameExpression( nameExpression ) , mShowName( showName ) , mIsEditable( isEditable ) , mEditableExpression( editableExpression )