--- a/Beremiz.py Wed Mar 27 14:10:39 2019 +0100
+++ b/Beremiz.py Thu Mar 28 09:19:30 2019 +0100
@@ -33,20 +33,6 @@
import wx
from wx.lib.agw.advancedsplash import AdvancedSplash, AS_NOTIMEOUT, AS_CENTER_ON_SCREEN
-import traceback
-from pprint import pprint
-orig_NewId = wx.NewId
-log_newid = {}
-def NewId(*a,**k):
- res = orig_NewId(*a,**k)
- bt = '|'.join([':'.join([f,str(l)]) for f,l,_0,_1 in traceback.extract_stack()[-2:-1]])
- log_newid[bt] = log_newid.get(bt, 0) + 1
- worst = log_newid.items()
- worst.sort(key=lambda x:x[1])
- pprint(worst)
- return res
-wx.NewId = NewId
-
import util.paths as paths
--- a/editors/Viewer.py Wed Mar 27 14:10:39 2019 +0100
+++ b/editors/Viewer.py Thu Mar 28 09:19:30 2019 +0100
@@ -1605,9 +1605,9 @@
iec_path = self.GetElementIECPath(self.SelectedElement)
if iec_path is not None:
menu = wx.Menu(title='')
- item = menu.Append(wx.ANY_ID, help='', kind=wx.ITEM_NORMAL, text=_("Force value"))
+ item = menu.Append(wx.ID_ANY, help='', kind=wx.ITEM_NORMAL, text=_("Force value"))
self.Bind(wx.EVT_MENU, self.GetForceVariableMenuFunction(iec_path.upper(), self.SelectedElement), item)
- ritem = menu.Append(wx.ANY_ID, help='', kind=wx.ITEM_NORMAL, text=_("Release value"))
+ ritem = menu.Append(wx.ID_ANY, help='', kind=wx.ITEM_NORMAL, text=_("Release value"))
self.Bind(wx.EVT_MENU, self.GetReleaseVariableMenuFunction(iec_path.upper()), ritem)
if self.SelectedElement.IsForced():
ritem.Enable(True)