diff --git a/app/attributes/attributecontroller.cpp b/app/attributes/attributecontroller.cpp index d0952b213..ed0f17b83 100644 --- a/app/attributes/attributecontroller.cpp +++ b/app/attributes/attributecontroller.cpp @@ -920,7 +920,7 @@ void AttributeController::recalculateDerivedItems( bool isFormValueChange, bool } } - // Evaluate form items editability + // Evaluate if form items are editable { QMap>::iterator formItemsIterator = mFormItems.begin(); while ( formItemsIterator != mFormItems.end() ) @@ -935,12 +935,12 @@ void AttributeController::recalculateDerivedItems( bool isFormValueChange, bool if ( exp.isValid() ) { - editable = exp.evaluate( &expressionContext ).toInt(); + editable = exp.evaluate( &expressionContext ).toBool(); } if ( item->isEditable() != editable ) { - item->setEditable( editable ); + item->setIsEditable( editable ); changedFormItems << item->id(); } } diff --git a/app/attributes/attributedata.cpp b/app/attributes/attributedata.cpp index 847073455..a9e761cda 100644 --- a/app/attributes/attributedata.cpp +++ b/app/attributes/attributedata.cpp @@ -245,7 +245,7 @@ void FormItem::setVisible( bool visible ) mVisible = visible; } -void FormItem::setEditable( bool editable ) +void FormItem::setIsEditable( bool editable ) { mIsEditable = editable; } diff --git a/app/attributes/attributedata.h b/app/attributes/attributedata.h index 74edc2d87..fae50f838 100644 --- a/app/attributes/attributedata.h +++ b/app/attributes/attributedata.h @@ -128,7 +128,7 @@ class FormItem void setValidationStatus( FieldValidator::ValidationStatus status ); bool isEditable() const; - void setEditable( bool editable ); + void setIsEditable( bool editable ); bool isVisible() const; void setVisible( bool visible );