--- a/Viewer.py Fri Dec 04 15:22:57 2009 +0100
+++ b/Viewer.py Fri Dec 04 15:25:36 2009 +0100
@@ -1101,6 +1101,22 @@
# Popup menu functions
#-------------------------------------------------------------------------------
+ def PopupForceMenu(self):
+ iec_path = self.GetElementIECPath(self.SelectedElement)
+ if iec_path is not None:
+ menu = wx.Menu(title='')
+ new_id = wx.NewId()
+ AppendMenu(menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=_("Force value"))
+ #self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(base_type), id=new_id)
+ new_id = wx.NewId()
+ AppendMenu(menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=_("Release value"))
+ #self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(base_type), id=new_id)
+ if self.SelectedElement.IsForced():
+ menu.Enable(new_id, True)
+ else:
+ menu.Enable(new_id, False)
+ self.PopupMenu(menu)
+
def PopupBlockMenu(self, connector = None):
if connector is not None and connector.IsCompatible("BOOL"):
type = self.Controler.GetEditedElementType(self.TagName, self.Debug)