330 var_class = OUTPUT |
330 var_class = OUTPUT |
331 elif values[1] == "InOut": |
331 elif values[1] == "InOut": |
332 var_class = INPUT |
332 var_class = INPUT |
333 else: |
333 else: |
334 var_class = INPUT |
334 var_class = INPUT |
335 tree = dict([(var["Name"], var["Tree"]) for var in self.ParentWindow.Controler.GetEditedElementInterfaceVars(tagname, self.ParentWindow.Debug)]).get(values[0], None) |
335 tree = dict([(var.Name, var.Tree) for var in self.ParentWindow.Controler.GetEditedElementInterfaceVars(tagname, True, self.ParentWindow.Debug)]).get(values[0], None) |
336 if tree is not None: |
336 if tree is not None: |
337 if len(tree[0]) > 0: |
337 if len(tree[0]) > 0: |
338 menu = wx.Menu(title='') |
338 menu = wx.Menu(title='') |
339 self.GenerateTreeMenu(x, y, scaling, menu, "", var_class, [(values[0], values[2], tree)]) |
339 self.GenerateTreeMenu(x, y, scaling, menu, "", var_class, [(values[0], values[2], tree)]) |
340 self.ParentWindow.PopupMenuXY(menu) |
340 self.ParentWindow.PopupMenuXY(menu) |
2618 |
2618 |
2619 def AddNewActionBlock(self, bbox, wire=None): |
2619 def AddNewActionBlock(self, bbox, wire=None): |
2620 dialog = ActionBlockDialog(self.ParentWindow) |
2620 dialog = ActionBlockDialog(self.ParentWindow) |
2621 dialog.SetQualifierList(self.Controler.GetQualifierTypes()) |
2621 dialog.SetQualifierList(self.Controler.GetQualifierTypes()) |
2622 dialog.SetActionList(self.Controler.GetEditedElementActions(self.TagName, self.Debug)) |
2622 dialog.SetActionList(self.Controler.GetEditedElementActions(self.TagName, self.Debug)) |
2623 dialog.SetVariableList(self.Controler.GetEditedElementInterfaceVars(self.TagName, self.Debug)) |
2623 dialog.SetVariableList(self.Controler.GetEditedElementInterfaceVars(self.TagName, debug=self.Debug)) |
2624 if dialog.ShowModal() == wx.ID_OK: |
2624 if dialog.ShowModal() == wx.ID_OK: |
2625 id = self.GetNewId() |
2625 id = self.GetNewId() |
2626 actionblock = SFC_ActionBlock(self, dialog.GetValues(), id) |
2626 actionblock = SFC_ActionBlock(self, dialog.GetValues(), id) |
2627 self.Controler.AddEditedElementActionBlock(self.TagName, id) |
2627 self.Controler.AddEditedElementActionBlock(self.TagName, id) |
2628 self.AddNewElement(actionblock, bbox, wire) |
2628 self.AddNewElement(actionblock, bbox, wire) |
2868 |
2868 |
2869 def EditActionBlockContent(self, actionblock): |
2869 def EditActionBlockContent(self, actionblock): |
2870 dialog = ActionBlockDialog(self.ParentWindow) |
2870 dialog = ActionBlockDialog(self.ParentWindow) |
2871 dialog.SetQualifierList(self.Controler.GetQualifierTypes()) |
2871 dialog.SetQualifierList(self.Controler.GetQualifierTypes()) |
2872 dialog.SetActionList(self.Controler.GetEditedElementActions(self.TagName, self.Debug)) |
2872 dialog.SetActionList(self.Controler.GetEditedElementActions(self.TagName, self.Debug)) |
2873 dialog.SetVariableList(self.Controler.GetEditedElementInterfaceVars(self.TagName, self.Debug)) |
2873 dialog.SetVariableList(self.Controler.GetEditedElementInterfaceVars(self.TagName, debug=self.Debug)) |
2874 dialog.SetValues(actionblock.GetActions()) |
2874 dialog.SetValues(actionblock.GetActions()) |
2875 if dialog.ShowModal() == wx.ID_OK: |
2875 if dialog.ShowModal() == wx.ID_OK: |
2876 actions = dialog.GetValues() |
2876 actions = dialog.GetValues() |
2877 rect = actionblock.GetRedrawRect(1, 1) |
2877 rect = actionblock.GetRedrawRect(1, 1) |
2878 actionblock.SetActions(actions) |
2878 actionblock.SetActions(actions) |