IDEFrame.py
changeset 1010 44c3cafef436
parent 999 cbab4c1635bd
child 1015 50bb7cc12a84
equal deleted inserted replaced
1009:741fbce41ec2 1010:44c3cafef436
  1786             
  1786             
  1787             elif name == "Transitions":
  1787             elif name == "Transitions":
  1788                 menu = wx.Menu(title='')
  1788                 menu = wx.Menu(title='')
  1789                 new_id = wx.NewId()
  1789                 new_id = wx.NewId()
  1790                 AppendMenu(menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=_("Add Transition"))
  1790                 AppendMenu(menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=_("Add Transition"))
  1791                 parent = self.ProjectTree.GetItemParent(item)["type"]
  1791                 parent = self.ProjectTree.GetItemParent(item)
  1792                 parent_type = self.ProjectTree.GetPyData(parent)
  1792                 parent_type = self.ProjectTree.GetPyData(parent)["type"]
  1793                 while parent_type != ITEM_POU:
  1793                 while parent_type != ITEM_POU:
  1794                     parent = self.ProjectTree.GetItemParent(parent)
  1794                     parent = self.ProjectTree.GetItemParent(parent)
  1795                     parent_type = self.ProjectTree.GetPyData(parent)["type"]
  1795                     parent_type = self.ProjectTree.GetPyData(parent)["type"]
  1796                 self.Bind(wx.EVT_MENU, self.GenerateAddTransitionFunction(self.ProjectTree.GetItemText(parent)), id=new_id)
  1796                 self.Bind(wx.EVT_MENU, self.GenerateAddTransitionFunction(self.ProjectTree.GetItemText(parent)), id=new_id)
  1797             
  1797