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 321ec8ffd9
commit b0794ccaf9

View File

@ -110,6 +110,14 @@ class MiRCARTCanvasInterface():
# }}} # }}}
# {{{ canvasExit(self, event): XXX # {{{ canvasExit(self, event): XXX
def canvasExit(self, event): 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) self.parentFrame.Close(True)
# }}} # }}}
# {{{ canvasExportAsPng(self, event): XXX # {{{ canvasExportAsPng(self, event): XXX