Commit d99be75b authored by Guillaume Seguin's avatar Guillaume Seguin

Fix potential thread conflict in lock() behavior

parent 5a039b9f
......@@ -343,8 +343,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
print _("Print started at: %s") % format_time(self.starttime)
self.compute_eta = RemainingTimeEstimator(self.fgcode)
if self.settings.lockbox and self.settings.lockonstart:
self.locker.SetValue(True)
self.lock()
wx.CallAfter(self.lock, force = True)
def endcb(self):
if self.p.queueindex == 0:
......@@ -1749,7 +1748,9 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self.paused = 0
dlg.Destroy()
def lock(self, event = None):
def lock(self, event = None, force = None):
if force != None:
self.locker.SetValue(force)
if self.locker.GetValue():
print _("Locking interface.")
for panel in self.panels:
......
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