# HG changeset patch # User Edouard Tisserant # Date 1615975649 -3600 # Node ID 26b7c4aa7b3844f3a2691e01696208cfa304b4d0 # Parent 80dd371e15bb8cb6d771234bf6348c3cb689b3df# Parent 9038655c1b187b1a94983eb48b6f92ed42cde23f merged diff -r 80dd371e15bb -r 26b7c4aa7b38 runtime/PLCObject.py --- a/runtime/PLCObject.py Tue Mar 16 14:19:22 2021 +0100 +++ b/runtime/PLCObject.py Wed Mar 17 11:07:29 2021 +0100 @@ -459,6 +459,7 @@ self.PythonThreadAcknowledge(cmd) self.PythonRuntimeCall("start") self.LogMessage("Python extensions started") + self.PostStartPLC() self.PythonThreadLoop() self.PythonRuntimeCall("stop", reverse_order=True) elif cmd == "Finish": @@ -496,6 +497,16 @@ """ pass + def PostStartPLC(self): + """ + Here goes actions to be taken after PLC is started, + with all libraries and python object already created, + and python extensions "Start" methods being called. + This is called before python thread processing py_eval blocks starts. + For example : attach additional ressource to web services + """ + pass + @RunInMain def StartPLC(self): diff -r 80dd371e15bb -r 26b7c4aa7b38 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Tue Mar 16 14:19:22 2021 +0100 +++ b/svghmi/gen_index_xhtml.xslt Wed Mar 17 11:07:29 2021 +0100 @@ -5562,21 +5562,7 @@ styles: { - - - - - - - ; - - - - - - - - + : " diff -r 80dd371e15bb -r 26b7c4aa7b38 svghmi/widget_list.ysl2 --- a/svghmi/widget_list.ysl2 Tue Mar 16 14:19:22 2021 +0100 +++ b/svghmi/widget_list.ysl2 Wed Mar 17 11:07:29 2021 +0100 @@ -13,13 +13,7 @@ param "hmi_element"; | styles: { foreach "$hmi_element/*[@inkscape:label]" { - const "text", "func:refered_elements(.)[self::svg:text][1]"; - const "tspan", "$text/svg:tspan[1]"; - const "style" choose { - when "$text/@style and $tspan/@style" > «$text/@style»;«$tspan/@style» - otherwise > «$text/@style»«$tspan/@style» - - } + const "style", "func:refered_elements(.)[self::svg:text]/@style"; | «@inkscape:label»: "«$style»", } | },