svghmi/widgets_common.ysl2
branchsvghmi
changeset 3098 5823b73b132f
parent 3058 6ea4b7e1a9ed
child 3099 c7d14130401f
--- a/svghmi/widgets_common.ysl2	Thu Dec 24 16:56:19 2020 +0100
+++ b/svghmi/widgets_common.ysl2	Thu Dec 24 17:00:43 2020 +0100
@@ -182,10 +182,13 @@
             }
             return index;
         }
+
         change_hmi_value(index, opstr) {
             let realindex = this.get_variable_index(index);
             if(realindex == undefined) return undefined;
-            return change_hmi_value(realindex, opstr);
+            let old_val = cache[realindex];
+            let new_val = eval_operation_string(old_val, opstr);
+            return apply_hmi_value(realindex, new_val);
         }
 
         apply_hmi_value(index, new_val) {