From: Youness Alaoui Date: Mon, 14 Sep 2015 20:06:56 +0000 (-0400) Subject: do not use EVT_WIZARD_PAGE_SHOWN since it's missing in 2.8 X-Git-Tag: lulzbot-17.04~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=fa6cd0db6bd0eceb3bdc095689ed3a24bce2492b;p=cura.git do not use EVT_WIZARD_PAGE_SHOWN since it's missing in 2.8 --- diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index 039b4191..ba705692 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -1516,6 +1516,8 @@ class LulzbotChangeToolheadWizard(wx.wizard.Wizard): self.FindWindowById(wx.ID_BACKWARD).Enable() else: self.FindWindowById(wx.ID_BACKWARD).Disable() + if hasattr(e.GetPage(), 'OnPageShown'): + e.GetPage().OnPageShown() def OnCancel(self, e): profile.putProfileSetting('nozzle_size', self._nozzle_size) @@ -1533,7 +1535,6 @@ class ConfigWizard(wx.wizard.Wizard): self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGED, self.OnPageChanged) self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING, self.OnPageChanging) - self.Bind(wx.wizard.EVT_WIZARD_PAGE_SHOWN, self.OnPageShown) self.Bind(wx.wizard.EVT_WIZARD_CANCEL, self.OnCancel) self.machineSelectPage = MachineSelectPage(self) @@ -1573,11 +1574,6 @@ class ConfigWizard(wx.wizard.Wizard): self.RunWizard(self.lulzbotMachineSelectPage) self.Destroy() - def OnPageShown(self, e): - page = e.GetPage() - if hasattr(page, 'OnPageShown'): - page.OnPageShown() - def OnPageChanging(self, e): e.GetPage().StoreData() @@ -1590,6 +1586,8 @@ class ConfigWizard(wx.wizard.Wizard): self.FindWindowById(wx.ID_BACKWARD).Enable() else: self.FindWindowById(wx.ID_BACKWARD).Disable() + if hasattr(e.GetPage(), 'OnPageShown'): + e.GetPage().OnPageShown() def OnCancel(self, e): new_machine_index = int(profile.getPreferenceFloat('active_machine'))