fix clearing project name on opening project properties page.
The problem exists only on Windows with wxPython-3.0.
This happens because callback for EVT_KILL_FOCUS for a first text
control (project name) is called just after creating page with project
properties. It happens before initializing text controls from PLCController.
--- a/controls/ProjectPropertiesPanel.py Tue Apr 11 17:45:49 2017 +0300
+++ b/controls/ProjectPropertiesPanel.py Tue Apr 11 19:09:34 2017 +0300
@@ -272,11 +272,8 @@
def GetTextCtrlChangedFunction(self, textctrl, name):
def TextCtrlChangedFunction(event):
- if self.Controller is not None:
- if self.Values is not None:
- old_value = self.Values.get(name)
- else:
- old_value = None
+ 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 == "":
new_value = None