Merge from default wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 01 Oct 2021 17:44:52 +0200
branchwxPython4
changeset 3327 d753cc166bd0
parent 3326 18d743e517b5 (current diff)
parent 3319 e6c758e41f82 (diff)
child 3328 01682a34a558
Merge from default
editors/TextViewer.py
--- a/editors/TextViewer.py	Fri Oct 01 15:36:09 2021 +0200
+++ b/editors/TextViewer.py	Fri Oct 01 17:44:52 2021 +0200
@@ -377,7 +377,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)