From: Youness Alaoui Date: Tue, 4 Aug 2015 18:46:40 +0000 (-0400) Subject: Fix a double destruction of firmware install dialog when no default firmware is found X-Git-Tag: lulzbot-15.02.1-2.01~36 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e2f88b7eea4daf249834a2bc4d93a05988585380;p=cura.git Fix a double destruction of firmware install dialog when no default firmware is found --- diff --git a/Cura/gui/firmwareInstall.py b/Cura/gui/firmwareInstall.py index e825568f..177fe97c 100644 --- a/Cura/gui/firmwareInstall.py +++ b/Cura/gui/firmwareInstall.py @@ -94,10 +94,6 @@ class InstallFirmwareDialog(wx.Dialog): port = profile.getMachineSetting('serial_port') if filename is None: filename = getDefaultFirmware(machineIndex) - if filename is None: - wx.MessageBox(_("I am sorry, but Cura does not ship with a default firmware for your machine configuration."), _("Firmware update"), wx.OK | wx.ICON_ERROR) - self.Destroy() - return self._machine_type = profile.getMachineSetting('machine_type', machineIndex) if self._machine_type == 'reprap': wx.MessageBox(_("Cura only supports firmware updates for ATMega2560 based hardware.\nSo updating your RepRap with Cura might or might not work."), _("Firmware update"), wx.OK | wx.ICON_INFORMATION) @@ -122,6 +118,9 @@ class InstallFirmwareDialog(wx.Dialog): self.success = False def Run(self): + if self.filename is None: + wx.MessageBox(_("I am sorry, but Cura does not ship with a default firmware for your machine configuration."), _("Firmware update"), wx.OK | wx.ICON_ERROR) + return False self.success = False self.thread = threading.Thread(target=self.OnRun) self.thread.daemon = True