Fixed local PLC runtime kill on aborted quit attempt.
authoretisserant
Mon, 25 Aug 2008 18:01:49 +0200
changeset 220 ad3292145fc2
parent 219 43d65f0179e2
child 221 451bb2c1d157
Fixed local PLC runtime kill on aborted quit attempt.
Beremiz.py
--- a/Beremiz.py	Mon Aug 25 18:01:01 2008 +0200
+++ b/Beremiz.py	Mon Aug 25 18:01:49 2008 +0200
@@ -409,10 +409,6 @@
                                               (int(last_line), int(last_column)))
 		
     def OnCloseFrame(self, event):
-        # shutdown local runtime
-        self.local_runtime.kill(SIGKILL)
-        # clear temp dir
-        shutil.rmtree(self.local_runtime_tmpdir)
         
         if self.PluginRoot.HasProjectOpened():
             if self.PluginRoot.ProjectTestModified():
@@ -425,13 +421,18 @@
                 if answer == wx.ID_YES:
                     self.PluginRoot.SaveProject()
                     event.Skip()
-                    return
                 elif answer == wx.ID_NO:
                     event.Skip()
                     return
                 else:
                     event.Veto()
                     return
+
+        # shutdown local runtime
+        self.local_runtime.kill(SIGKILL)
+        # clear temp dir
+        shutil.rmtree(self.local_runtime_tmpdir)
+
         event.Skip()
     
     def OnMoveWindow(self, event):