Sequel to 95fe62bfe920 : Copy description when DnD variables from Globals in resources and configuration variable panels to POUs, now including ST/IL POUs.
--- a/editors/TextViewer.py Mon Sep 13 12:19:17 2021 +0200
+++ b/editors/TextViewer.py Thu Sep 16 09:40:36 2021 +0200
@@ -369,7 +369,8 @@
message = _("\"%s\" pou already exists!") % var_name
else:
if not var_name.upper() in [name.upper() for name in self.Controler.GetEditedElementVariables(self.TagName, self.Debug)]:
- self.Controler.AddEditedElementPouExternalVar(self.TagName, values[2], var_name)
+ kwargs = dict(description=values[4]) if len(values)>4 else {}
+ self.Controler.AddEditedElementPouExternalVar(self.TagName, values[2], var_name, **kwargs)
self.RefreshVariablePanel()
self.RefreshVariableTree()
event.SetDragText(var_name)