From e5fccc283e2f08ea092ff1c16c59d17b3b8b1500 Mon Sep 17 00:00:00 2001 From: idziubenko Date: Wed, 23 Mar 2022 17:34:35 +0300 Subject: [PATCH] now comment= parameter in templates affects header in complex formats --- .gitignore | 3 ++- pym/calculate/lib/cl_template.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index db595f1..f850340 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ push_to_vmachine* *.pyc *.pyo *.bak -__pycache__ \ No newline at end of file +__pycache__ +build \ No newline at end of file diff --git a/pym/calculate/lib/cl_template.py b/pym/calculate/lib/cl_template.py index 122bc89..f0536b8 100644 --- a/pym/calculate/lib/cl_template.py +++ b/pym/calculate/lib/cl_template.py @@ -6276,6 +6276,8 @@ gettext -d cl_template "$*" # создаем объект формата шаблона objTemplNew = self.formatFactory.createObject( formatTemplate, self.textTemplate) + if objHeadNew.comment: + objTemplNew._comment = objHeadNew.comment if not objTemplNew: self.setError( _("Wrong header parameter '{var}={val}' " @@ -6407,6 +6409,8 @@ gettext -d cl_template "$*" # создаем объект формата шаблона objTemplNew = self.formatFactory.createObject( formatTemplate, self.textTemplate) + if objHeadNew.comment: + objTemplNew._comment = objHeadNew.comment if not objTemplNew: self.setError( _("Wrong header parameter '{var}={val}' in "