# HG changeset patch # User Andrey Skvortsov # Date 1491926974 -10800 # Node ID 55b6db51eb63e59a198e7c80253bc275fcb97677 # Parent db05cb9e0439d41d12f7d43df430b81347d13a61 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. diff -r db05cb9e0439 -r 55b6db51eb63 controls/ProjectPropertiesPanel.py --- 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