From: daid303 Date: Fri, 5 Oct 2012 09:20:22 +0000 (+0200) Subject: Start the first run wizard when we do not know the machine type. Only show the defaul... X-Git-Tag: 13.03~274 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=5a35b4ffc682adb71a91de582462bbe2d064ce28;p=cura.git Start the first run wizard when we do not know the machine type. Only show the default firmware install if we know that we have a default firmware for this machine. --- diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index 0b42adfa..c1ddc96f 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -246,6 +246,7 @@ class MachineSelectPage(InfoPage): profile.putPreference('machine_depth', '80') profile.putPreference('machine_height', '60') profile.putPreference('machine_type', 'reprap') + profile.putPreference('startMode', 'Normal') profile.putProfileSetting('nozzle_size', '0.5') profile.putProfileSetting('machine_center_x', '40') profile.putProfileSetting('machine_center_y', '40') diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index dc0a6a1a..ec8b53cb 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -26,9 +26,8 @@ from util import meshLoader def main(): #app = wx.App(False) - if profile.getPreference('wizardDone') == 'False': + if profile.getPreference('machine_type') == 'unknown': configWizard.configWizard() - profile.putPreference("wizardDone", "True") if profile.getPreference('startMode') == 'Simple': simpleMode.simpleModeWindow() else: @@ -85,8 +84,9 @@ class mainWindow(configBase.configWindowBase): i = expertMenu.Append(-1, 'Open expert settings...') self.Bind(wx.EVT_MENU, self.OnExpertOpen, i) expertMenu.AppendSeparator() - i = expertMenu.Append(-1, 'Install default Marlin firmware') - self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, i) + if firmwareInstall.getDefaultFirmware() != None: + i = expertMenu.Append(-1, 'Install default Marlin firmware') + self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, i) i = expertMenu.Append(-1, 'Install custom firmware') self.Bind(wx.EVT_MENU, self.OnCustomFirmware, i) expertMenu.AppendSeparator() diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index a4aef3b7..f8d62e44 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -131,23 +131,6 @@ class simpleModeWindow(configBase.configWindowBase): prefDialog = preferencesDialog.preferencesDialog(self) prefDialog.Centre() prefDialog.Show(True) - - def OnDefaultMarlinFirmware(self, e): - firmwareInstall.InstallFirmware() - - def OnCustomFirmware(self, e): - dlg=wx.FileDialog(self, "Open firmware to upload", os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) - dlg.SetWildcard("HEX file (*.hex)|*.hex;*.HEX") - if dlg.ShowModal() == wx.ID_OK: - filename = dlg.GetPath() - if not(os.path.exists(filename)): - return - #For some reason my Ubuntu 10.10 crashes here. - firmwareInstall.InstallFirmware(filename) - - def OnFirstRunWizard(self, e): - configWizard.configWizard() - self.updateProfileToControls() def OnLoadModel(self, e): dlg=wx.FileDialog(self, "Open file to print", os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index ea269d78..9d17e17d 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -147,7 +147,6 @@ G92 E0 """, } preferencesDefaultSettings = { - 'wizardDone': 'False', 'startMode': 'Simple', 'lastFile': os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', 'UltimakerRobot_support.stl')), 'machine_width': '205',