SVGHMI: propagate default local variables (HMI_LOCAL, PAGE_LOCAL) to widgets at startup svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 12 Feb 2021 21:58:03 +0100
branchsvghmi
changeset 3135 d723472a18a4
parent 3134 af558c9a5141
child 3136 784c839d4259
SVGHMI: propagate default local variables (HMI_LOCAL, PAGE_LOCAL) to widgets at startup
svghmi/widgets_common.ysl2
--- a/svghmi/widgets_common.ysl2	Tue Feb 09 17:10:08 2021 +0100
+++ b/svghmi/widgets_common.ysl2	Fri Feb 12 21:58:03 2021 +0100
@@ -114,6 +114,7 @@
         let defaultval = local_defaults[varname];
         if(defaultval != undefined) {
             cache[new_index] = defaultval; 
+            updates[new_index] = defaultval;
             if(persistent_locals.has(varname))
                 persistent_indexes.set(new_index, varname);
         }