lpcmanager

99a9767d92c5
Parents 95911ff0a039
Children 873694bb9ec0
Checking if self.VariableName exists.
--- a/LPCManager.py Thu Aug 24 12:55:26 2017 +0200
+++ b/LPCManager.py Wed Aug 30 10:36:13 2017 +0200
@@ -237,7 +237,10 @@
self.Location.SetFocus()
def GetName(self):
- return self.VariableName
+ if hasattr(self, "VariableName"):
+ return self.VariableName
+ else:
+ return None
LocationCellControl.OnBrowseButtonClick = OnBrowseButtonClick
LocationCellControl.GetName = GetName
@@ -247,7 +250,8 @@
changed = loc != old_loc
if changed:
name = self.CellControl.GetName()
- self.Table.SetValueByName(row, 'Name', name)
+ if name:
+ self.Table.SetValueByName(row, 'Name', name)
self.Table.SetValueByName(row, 'Location', loc)
self.Table.SetValueByName(row, 'Type', self.CellControl.GetVarType())
self.CellControl.Disable()