Commit 528a9e83 authored by Guillaume Seguin's avatar Guillaume Seguin

Protect calls from threading issues (#492)

parent 17b2a870
......@@ -1874,9 +1874,9 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
self.status_thread.join()
self.status_thread = None
self.connectbtn.SetLabel(_("Connect"))
self.connectbtn.SetToolTip(wx.ToolTip("Connect to the printer"))
self.connectbtn.Bind(wx.EVT_BUTTON, self.connect)
wx.CallAfter(self.connectbtn.SetLabel, _("Connect"))
wx.CallAfter(self.connectbtn.SetToolTip, wx.ToolTip(_("Connect to the printer")))
wx.CallAfter(self.connectbtn.Bind, wx.EVT_BUTTON, self.connect)
wx.CallAfter(self.printbtn.Disable)
wx.CallAfter(self.pausebtn.Disable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment