Commit 7dbcea77 authored by Guillaume Seguin's avatar Guillaume Seguin

Merge pull request #597 from maisim/master

Prevent unwanted exit
parents a361bd3d 5a3f4501
......@@ -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