editors/Viewer.py
changeset 1750 acf02488f37f
parent 1749 d73b64672238
child 1752 d14ff9d7eb76
equal deleted inserted replaced
1749:d73b64672238 1750:acf02488f37f
  1587 #                           Popup menu functions
  1587 #                           Popup menu functions
  1588 #-------------------------------------------------------------------------------
  1588 #-------------------------------------------------------------------------------
  1589 
  1589 
  1590     def GetForceVariableMenuFunction(self, iec_path, element):
  1590     def GetForceVariableMenuFunction(self, iec_path, element):
  1591         iec_type = self.GetDataType(iec_path)
  1591         iec_type = self.GetDataType(iec_path)
       
  1592 
  1592         def ForceVariableFunction(event):
  1593         def ForceVariableFunction(event):
  1593             if iec_type is not None:
  1594             if iec_type is not None:
  1594                 dialog = ForceVariableDialog(self.ParentWindow, iec_type, str(element.GetValue()))
  1595                 dialog = ForceVariableDialog(self.ParentWindow, iec_type, str(element.GetValue()))
  1595                 if dialog.ShowModal() == wx.ID_OK:
  1596                 if dialog.ShowModal() == wx.ID_OK:
  1596                     self.ParentWindow.AddDebugVariable(iec_path)
  1597                     self.ParentWindow.AddDebugVariable(iec_path)
  1934             wx.CallAfter(func, self.rubberBand.GetCurrentExtent(), *args)
  1935             wx.CallAfter(func, self.rubberBand.GetCurrentExtent(), *args)
  1935         return AddMenuCallBack
  1936         return AddMenuCallBack
  1936 
  1937 
  1937     def GetAddToWireMenuCallBack(self, func, *args):
  1938     def GetAddToWireMenuCallBack(self, func, *args):
  1938         args += (self.SelectedElement,)
  1939         args += (self.SelectedElement,)
       
  1940 
  1939         def AddToWireMenuCallBack(event):
  1941         def AddToWireMenuCallBack(event):
  1940             func(wx.Rect(0, 0, 0, 0), *args)
  1942             func(wx.Rect(0, 0, 0, 0), *args)
  1941         return AddToWireMenuCallBack
  1943         return AddToWireMenuCallBack
  1942 
  1944 
  1943     def GetClipboardCallBack(self, func):
  1945     def GetClipboardCallBack(self, func):