From: daid303 Date: Thu, 8 Nov 2012 09:13:58 +0000 (+0100) Subject: Make the endstop check in the first run wizard in a better order, and make re-running... X-Git-Tag: 13.03~201 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8e4fb0b147360740a51d9f6366a60f824140d130;p=cura.git Make the endstop check in the first run wizard in a better order, and make re-running the checks work better. --- diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index c1ddc96f..740832f6 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -331,10 +331,13 @@ class UltimakerCheckupPage(InfoPage): def OnSkipClick(self, e): self.GetParent().FindWindowById(wx.ID_FORWARD).Enable() - def OnCheckClick(self, e): + def OnCheckClick(self, e = None): if self.comm != None: self.comm.close() del self.comm + self.comm = None + wx.CallAfter(self.OnCheckClick) + return self.infoBox.SetInfo('Connecting to machine.') self.infoBox.SetBusyIndicator() self.commState.SetBitmap(self.unknownBitmap) @@ -398,6 +401,7 @@ class UltimakerCheckupPage(InfoPage): elif self.comm.isError(): wx.CallAfter(self.commState.SetBitmap, self.crossBitmap) wx.CallAfter(self.infoBox.SetError, 'Failed to establish connection with the printer.') + wx.CallAfter(self.endstopBitmap.Show, False) wx.CallAfter(self.machineState.SetLabel, 'Communication State: %s' % (self.comm.getStateString())) def mcMessage(self, message): @@ -422,15 +426,15 @@ class UltimakerCheckupPage(InfoPage): if self.checkupState == 3: if not self.xMinStop and not self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop: self.checkupState = 4 - wx.CallAfter(self.infoBox.SetAttention, 'Please press the left X endstop.') - wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopXMinBitmap) - elif self.checkupState == 4: - if self.xMinStop and not self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop: - self.checkupState = 5 wx.CallAfter(self.infoBox.SetAttention, 'Please press the right X endstop.') wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopXMaxBitmap) - elif self.checkupState == 5: + elif self.checkupState == 4: if not self.xMinStop and self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop: + self.checkupState = 5 + wx.CallAfter(self.infoBox.SetAttention, 'Please press the left X endstop.') + wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopXMinBitmap) + elif self.checkupState == 5: + if self.xMinStop and not self.xMaxStop and not self.yMinStop and not self.yMaxStop and not self.zMinStop and not self.zMaxStop: self.checkupState = 6 wx.CallAfter(self.infoBox.SetAttention, 'Please press the front Y endstop.') wx.CallAfter(self.endstopBitmap.SetBitmap, self.endStopYMinBitmap)