# HG changeset patch # User Surkov Sergey # Date 1519058203 -10800 # Node ID 38e912c8bd317b30c5db18f91d9f0a4083cdcd5d # Parent 62403f9b6ca9ca17c0ed4c97ec71fa6250169808 fix bug with indelible values in some 'optional' fields in project properties panel only 'required' fields should be indelible diff -r 62403f9b6ca9 -r 38e912c8bd31 controls/ProjectPropertiesPanel.py --- a/controls/ProjectPropertiesPanel.py Mon Feb 19 19:10:07 2018 +0300 +++ b/controls/ProjectPropertiesPanel.py Mon Feb 19 19:36:43 2018 +0300 @@ -285,7 +285,7 @@ if self.Controller is not None and self.Values is not None: old_value = self.Values.get(name) new_value = textctrl.GetValue() - if name not in REQUIRED_PARAMS and new_value == "": + if name in REQUIRED_PARAMS and new_value == "": new_value = None if name == 'companyURL': if not URI_model.match(new_value): diff -r 62403f9b6ca9 -r 38e912c8bd31 plcopen/plcopen.py --- a/plcopen/plcopen.py Mon Feb 19 19:10:07 2018 +0300 +++ b/plcopen/plcopen.py Mon Feb 19 19:36:43 2018 +0300 @@ -441,7 +441,7 @@ "authorName": contentheader_obj.setauthor, "pageSize": lambda v: contentheader_obj.setpageSize(*v), "scaling": contentheader_obj.setscaling}.get(attr) - if func is not None: + if func is not None and value is not None: func(value) elif attr in ["modificationDateTime", "organization", "language"]: setattr(contentheader_obj, attr, value)