|
@@ -2203,7 +2203,7 @@ class GMFrame(wx.Frame):
|
|
|
|
|
|
def OnCloseWindow(self, event):
|
|
def OnCloseWindow(self, event):
|
|
"""Cleanup when wxGUI is quitted"""
|
|
"""Cleanup when wxGUI is quitted"""
|
|
- self._closeWindow()
|
|
|
|
|
|
+ self._closeWindow(event)
|
|
|
|
|
|
def OnCloseWindowOrExit(self, event):
|
|
def OnCloseWindowOrExit(self, event):
|
|
"""Cleanup when wxGUI is quitted
|
|
"""Cleanup when wxGUI is quitted
|
|
@@ -2214,11 +2214,11 @@ class GMFrame(wx.Frame):
|
|
ret = dlg.ShowModal()
|
|
ret = dlg.ShowModal()
|
|
dlg.Destroy()
|
|
dlg.Destroy()
|
|
if ret != wx.ID_CANCEL:
|
|
if ret != wx.ID_CANCEL:
|
|
- self._closeWindow()
|
|
|
|
|
|
+ self._closeWindow(event)
|
|
if ret == wx.ID_YES:
|
|
if ret == wx.ID_YES:
|
|
self._quitGRASS()
|
|
self._quitGRASS()
|
|
|
|
|
|
- def _closeWindow(self):
|
|
|
|
|
|
+ def _closeWindow(self, event):
|
|
"""Close wxGUI"""
|
|
"""Close wxGUI"""
|
|
# save command protocol if actived
|
|
# save command protocol if actived
|
|
if self.goutput.btnCmdProtocol.GetValue():
|
|
if self.goutput.btnCmdProtocol.GetValue():
|
|
@@ -2247,6 +2247,7 @@ class GMFrame(wx.Frame):
|
|
style = wx.YES_NO | wx.YES_DEFAULT |
|
|
style = wx.YES_NO | wx.YES_DEFAULT |
|
|
wx.CANCEL | wx.ICON_QUESTION | wx.CENTRE)
|
|
wx.CANCEL | wx.ICON_QUESTION | wx.CENTRE)
|
|
ret = dlg.ShowModal()
|
|
ret = dlg.ShowModal()
|
|
|
|
+ dlg.Destroy()
|
|
if ret == wx.ID_YES:
|
|
if ret == wx.ID_YES:
|
|
if not self.workspaceFile:
|
|
if not self.workspaceFile:
|
|
self.OnWorkspaceSaveAs()
|
|
self.OnWorkspaceSaveAs()
|
|
@@ -2256,9 +2257,7 @@ class GMFrame(wx.Frame):
|
|
# when called from menu, it gets CommandEvent and not CloseEvent
|
|
# when called from menu, it gets CommandEvent and not CloseEvent
|
|
if hasattr(event, 'Veto'):
|
|
if hasattr(event, 'Veto'):
|
|
event.Veto()
|
|
event.Veto()
|
|
- dlg.Destroy()
|
|
|
|
return
|
|
return
|
|
- dlg.Destroy()
|
|
|
|
|
|
|
|
# don't ask any more...
|
|
# don't ask any more...
|
|
UserSettings.Set(group = 'manager', key = 'askOnQuit', subkey = 'enabled',
|
|
UserSettings.Set(group = 'manager', key = 'askOnQuit', subkey = 'enabled',
|