# HG changeset patch # User Edouard Tisserant # Date 1553688531 -3600 # Node ID 66a3c64c8dd07eb27829b1a96dead8c2d612e76f # Parent a6e7c34497b8b98b98f2c55bcf7a58f9bacf11b0 More wx.NewID abuse removal. This one was apparently silently unbinding toolbar butons when running out of mew wx IDs. diff -r a6e7c34497b8 -r 66a3c64c8dd0 BeremizIDE.py --- 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()