Fix: wx._core.wxAssertionError: C++ assertion "CanBeToggled()" failed python3
authorGP Orcullo <kinsamanka@gmail.com>
Fri, 28 Oct 2022 18:54:33 +0800
branchpython3
changeset 3763 369c7569bf94
parent 3762 247599238b9d
child 3764 d92c1a3dafa7
Fix: wx._core.wxAssertionError: C++ assertion "CanBeToggled()" failed
IDEFrame.py
--- a/IDEFrame.py	Fri Oct 28 17:42:47 2022 +0800
+++ b/IDEFrame.py	Fri Oct 28 18:54:33 2022 +0800
@@ -2190,8 +2190,8 @@
             EditorToolBar.ToggleTool(ID_PLCOPENEDITOREDITORTOOLBARSELECTION, True)
 
     def ResetToolToggle(self, id):
-        tool = self.Panes["EditorToolBar"].FindById(id)
-        tool.SetToggle(False)
+        tool = self.Panes["EditorToolBar"]
+        tool.ToggleTool(toolId=id, toggle=False)
 
     def OnSelectionTool(self, event):
         selected = self.TabsOpened.GetSelection()