More wx.NewID abuse removal. This one was apparently silently unbinding toolbar butons when running out of mew wx IDs.
--- a/BeremizIDE.py Tue Mar 26 11:03:57 2019 +0100
+++ b/BeremizIDE.py Wed Mar 27 13:08:51 2019 +0100
@@ -743,11 +743,10 @@
for confnode_method in self.CTR.StatusMethods:
if "method" in confnode_method and confnode_method.get("shown", True):
- id = wx.NewId()
- StatusToolBar.AddSimpleTool(
- id, GetBitmap(confnode_method.get("bitmap", "Unknown")),
+ tool = StatusToolBar.AddSimpleTool(
+ wx.ID_ANY, GetBitmap(confnode_method.get("bitmap", "Unknown")),
confnode_method["tooltip"])
- self.Bind(wx.EVT_MENU, self.GetMenuCallBackFunction(confnode_method["method"]), id=id)
+ self.Bind(wx.EVT_MENU, self.GetMenuCallBackFunction(confnode_method["method"]), tool)
StatusToolBar.Realize()
self.AUIManager.GetPane("StatusToolBar").BestSize(StatusToolBar.GetBestSize()).Show()