# HG changeset patch
# User Edouard Tisserant <edouard.tisserant@gmail.com>
# Date 1633103092 -7200
# Node ID d753cc166bd0b8a8affec20ccc77835aca56e136
# Parent  18d743e517b5e246347d607f30a7a0257fc540c9# Parent  e6c758e41f828cd07eaf08587ebf256b0802c463
Merge from default

diff -r 18d743e517b5 -r d753cc166bd0 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)