From: daid Date: Thu, 13 Feb 2014 07:08:44 +0000 (+0100) Subject: Allow back in the configuration wizard. X-Git-Tag: 14.02-RC1~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0bb9f3e06577d19928cd6a45dcd9958725133ec1;p=cura.git Allow back in the configuration wizard. --- diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index 94e9ca4b..cb3ab43d 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -210,6 +210,9 @@ class InfoPage(wx.wizard.WizardPageSimple): def AllowNext(self): return True + def AllowBack(self): + return True + def StoreData(self): pass @@ -232,6 +235,9 @@ class FirstInfoPage(InfoPage): #self.AddText('* Calibrate your machine') #self.AddText('* Do your first print') + def AllowBack(self): + return False + class OtherMachineSelectPage(InfoPage): def __init__(self, parent): @@ -860,7 +866,10 @@ class configWizard(wx.wizard.Wizard): self.FindWindowById(wx.ID_FORWARD).Enable() else: self.FindWindowById(wx.ID_FORWARD).Disable() - self.FindWindowById(wx.ID_BACKWARD).Disable() + if e.GetPage().AllowBack(): + self.FindWindowById(wx.ID_BACKWARD).Enable() + else: + self.FindWindowById(wx.ID_BACKWARD).Disable() class bedLevelWizardMain(InfoPage): def __init__(self, parent): @@ -1045,6 +1054,9 @@ class headOffsetCalibrationPage(InfoPage): self.Bind(wx.EVT_BUTTON, self.OnConnect, self.connectButton) self.Bind(wx.EVT_BUTTON, self.OnResume, self.resumeButton) + def AllowBack(self): + return True + def OnConnect(self, e = None): if self.comm is not None: self.comm.close() @@ -1265,7 +1277,10 @@ class bedLevelWizard(wx.wizard.Wizard): self.FindWindowById(wx.ID_FORWARD).Enable() else: self.FindWindowById(wx.ID_FORWARD).Disable() - self.FindWindowById(wx.ID_BACKWARD).Disable() + if e.GetPage().AllowBack(): + self.FindWindowById(wx.ID_BACKWARD).Enable() + else: + self.FindWindowById(wx.ID_BACKWARD).Disable() class headOffsetWizard(wx.wizard.Wizard): def __init__(self): @@ -1290,4 +1305,7 @@ class headOffsetWizard(wx.wizard.Wizard): self.FindWindowById(wx.ID_FORWARD).Enable() else: self.FindWindowById(wx.ID_FORWARD).Disable() - self.FindWindowById(wx.ID_BACKWARD).Disable() + if e.GetPage().AllowBack(): + self.FindWindowById(wx.ID_BACKWARD).Enable() + else: + self.FindWindowById(wx.ID_BACKWARD).Disable()