beremiz
Clone
Summary
Browse
Changes
Graph
Fix bug when closing project
2013-01-29, Laurent Bessard
8dc28b21bdac
Parents
94436558f0ce
Children
697d8b77d716
Fix bug when closing project
1 files changed, 8 insertions(+), 7 deletions(-)
+8
-7
controls/PouInstanceVariablesPanel.py
--- a/controls/PouInstanceVariablesPanel.py Tue Jan 29 21:34:43 2013 +1100
+++ b/controls/PouInstanceVariablesPanel.py Tue Jan 29 18:01:51 2013 +0100
@@ -105,13 +105,14 @@
self.RefreshView()
def SetPouType(self, tagname, pou_instance=None):
- self.PouTagName = tagname
- if self.PouTagName == "Project":
- config_name = self.Controller.GetProjectMainConfigurationName()
- if config_name is not None:
- self.PouTagName = self.Controller.ComputeConfigurationName(config_name)
- if pou_instance is not None:
- self.PouInstance = pou_instance
+ if self.Controller is not None:
+ self.PouTagName = tagname
+ if self.PouTagName == "Project":
+ config_name = self.Controller.GetProjectMainConfigurationName()
+ if config_name is not None:
+ self.PouTagName = self.Controller.ComputeConfigurationName(config_name)
+ if pou_instance is not None:
+ self.PouInstance = pou_instance
self.RefreshView()