Skip to content
Snippets Groups Projects
Commit 1e491fe3 authored by Cabestaing François's avatar Cabestaing François
Browse files

Change events to avoid multi-threading errors

parent c6227695
No related branches found
No related tags found
No related merge requests found
......@@ -189,10 +189,13 @@ class Speller(wx.Frame):
def OnKeyDown(self, event):
keycode = event.GetKeyCode()
event.Skip()
pub.sendMessage("listener", message="falling")
wx.CallAfter(self.Clicked)
def Listener(self, message):
if message == "falling":
wx.CallAtfer(self.Clicked)
def Clicked(self):
if not self.running:
self.running = True
self.cycle = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment