chiark / gitweb /
do not use EVT_WIZARD_PAGE_SHOWN since it's missing in 2.8
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 14 Sep 2015 20:06:56 +0000 (16:06 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 14 Sep 2015 20:12:09 +0000 (16:12 -0400)
Cura/gui/configWizard.py

index 039b419115acd394c41335147eabcee3c8db8500..ba705692d895d8195a11268cc792e69515e00838 100644 (file)
@@ -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'))