Skip to content

Commit

Permalink
explicitly recalculate delta when applying a calculated value
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrenn committed Mar 7, 2024
1 parent dee9544 commit 5b1c0a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/main/resources/fieldCalculation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ var FieldCalculation = FieldCalculation || {};
var inputFieldVariable = _getSeriesInputFieldVariable(variableName, index, false);
if (inputFieldVariable) {
inputFieldVariable.enteredValue = _cloneJSON( inputFieldVariable.value);
inputFieldVariable.delta = false;
inputFieldVariable.delta = !_equalInputFieldVariable(inputFieldVariable);
if (FIELD_CALCULATION_DEBUG_LEVEL >= 1) {
console.log("apply calculated value " + _debugVarName(inputFieldVariable));
}
Expand Down
4 changes: 2 additions & 2 deletions web/src/main/webapp/resources/js/fieldCalculation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1956,8 +1956,8 @@ var FieldCalculation = FieldCalculation || {};
function _inputFieldApplyCalculatedValue(variableName, index) {
var inputFieldVariable = _getSeriesInputFieldVariable(variableName, index, false);
if (inputFieldVariable) {
inputFieldVariable.enteredValue = _cloneJSON( inputFieldVariable.value);
inputFieldVariable.delta = false;
inputFieldVariable.enteredValue = _cloneJSON(inputFieldVariable.value);
inputFieldVariable.delta = !_equalInputFieldVariable(inputFieldVariable);
if (FIELD_CALCULATION_DEBUG_LEVEL >= 1) {
console.log("apply calculated value " + _debugVarName(inputFieldVariable));
}
Expand Down

0 comments on commit 5b1c0a7

Please sign in to comment.