Commit 3a165e6a authored by Simon Maillard's avatar Simon Maillard

Prevent unwanted exit

parent b2f95128
......@@ -325,6 +325,11 @@ class PronterWindow(MainWindow, pronsole.pronsole):
event.Skip()
def on_exit(self, event):
# prevent unwanted exit
if(self.p.printing | self.p.paused):
dlg = wx.MessageDialog(self, _("Print in progress ! Are you really sure you want to quit ?"), _("Exit"), wx.YES_NO | wx.ICON_WARNING)
if dlg.ShowModal() == wx.ID_NO:
return
self.Close()
def kill(self, e):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment