MiRCARTCanvasInterface.py: prompt to save changes on exit given non-None canvasPathName.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-11 01:12:55 +01:00
parent 02d3c7f6f4
commit cf04a12690

View File

@ -110,6 +110,14 @@ class MiRCARTCanvasInterface():
# }}}
# {{{ canvasExit(self, event): XXX
def canvasExit(self, event):
if self.canvasPathName != None:
saveChanges = self._dialogSaveChanges()
if saveChanges == wx.ID_CANCEL:
return
elif saveChanges == wx.ID_NO:
pass
elif saveChanges == wx.ID_YES:
self.canvasSave()
self.parentFrame.Close(True)
# }}}
# {{{ canvasExportAsPng(self, event): XXX