diff --git a/MiRCARTCanvasInterface.py b/MiRCARTCanvasInterface.py index 1e29ff1..8818170 100644 --- a/MiRCARTCanvasInterface.py +++ b/MiRCARTCanvasInterface.py @@ -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