From 21bf54fdd1aca2904eea20290276a6c1260366d0 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Fri, 31 Jul 2015 17:02:49 -0400 Subject: [PATCH] Add a 'Are you sure' dialog to the firmware upgrade skip button --- Cura/gui/configWizard.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index ab1d3846..0377d6d8 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -1401,8 +1401,14 @@ class LulzbotFirmwareUpdatePage(InfoPage): self.GetParent().FindWindowById(wx.ID_FORWARD).Enable() def OnSkipClick(self, e): - self.GetParent().FindWindowById(wx.ID_FORWARD).Enable() - self.GetParent().ShowPage(self.GetNext()) + dlg = wx.MessageDialog(self, _("Are you sure you want to skip the firmware upgrade?\n" + + "It could damage your printer if you changed your toolhead and have not updated thefirmware!"), + _('Skip firmware upgrade?'), wx.YES_NO | wx.ICON_EXCLAMATION) + skip = dlg.ShowModal() == wx.ID_YES + dlg.Destroy() + if skip: + self.GetParent().FindWindowById(wx.ID_FORWARD).Enable() + self.GetParent().ShowPage(self.GetNext()) class LulzbotChangeToolheadWizard(wx.wizard.Wizard): def __init__(self): -- 2.30.2