equal
deleted
inserted
replaced
111 self.Controller = controller |
111 self.Controller = controller |
112 |
112 |
113 self.RefreshView() |
113 self.RefreshView() |
114 |
114 |
115 def SetPouType(self, tagname, pou_instance=None): |
115 def SetPouType(self, tagname, pou_instance=None): |
116 if self.Controller is not None: |
116 if self.Controller is not None: |
117 self.PouTagName = tagname |
117 self.PouTagName = tagname |
118 if self.PouTagName == "Project": |
118 if self.PouTagName == "Project": |
119 config_name = self.Controller.GetProjectMainConfigurationName() |
119 config_name = self.Controller.GetProjectMainConfigurationName() |
120 if config_name is not None: |
120 if config_name is not None: |
121 self.PouTagName = self.Controller.ComputeConfigurationName(config_name) |
121 self.PouTagName = self.Controller.ComputeConfigurationName(config_name) |
132 self.PouInstance = None |
132 self.PouInstance = None |
133 |
133 |
134 self.RefreshView() |
134 self.RefreshView() |
135 |
135 |
136 def RefreshView(self): |
136 def RefreshView(self): |
|
137 self.Freeze() |
137 self.VariablesList.DeleteAllItems() |
138 self.VariablesList.DeleteAllItems() |
138 self.InstanceChoice.Clear() |
139 self.InstanceChoice.Clear() |
139 self.InstanceChoice.SetValue("") |
140 self.InstanceChoice.SetValue("") |
140 |
141 |
141 if self.Controller is not None and self.PouTagName is not None: |
142 if self.Controller is not None and self.PouTagName is not None: |
210 self.PouInstance = None |
211 self.PouInstance = None |
211 self.InstanceChoice.SetValue(_("Select an instance")) |
212 self.InstanceChoice.SetValue(_("Select an instance")) |
212 |
213 |
213 self.RefreshButtons() |
214 self.RefreshButtons() |
214 |
215 |
|
216 self.Thaw() |
|
217 |
215 def RefreshButtons(self): |
218 def RefreshButtons(self): |
216 enabled = self.InstanceChoice.GetSelection() != -1 |
219 enabled = self.InstanceChoice.GetSelection() != -1 |
217 self.ParentButton.Enable(enabled and self.PouInfos["class"] != ITEM_CONFIGURATION) |
220 self.ParentButton.Enable(enabled and self.PouInfos["class"] != ITEM_CONFIGURATION) |
218 self.DebugButton.Enable(enabled and self.PouInfos["debug"] and self.Debug) |
221 self.DebugButton.Enable(enabled and self.PouInfos["debug"] and self.Debug) |
219 |
222 |