merge
authorEdouard Tisserant
Tue, 06 Mar 2012 22:42:56 +0100
changeset 698 513c66e64b8e
parent 695 f378fe028f6c (current diff)
parent 697 3e83853081d4 (diff)
child 700 b0a7abd50b09
merge
--- a/LPCBeremiz.py	Thu Feb 23 17:45:11 2012 +0100
+++ b/LPCBeremiz.py	Tue Mar 06 22:42:56 2012 +0100
@@ -872,11 +872,11 @@
         data = builder.GetBinaryCode()
         if data is not None :
             if self._connector.NewPLC(builder.GetBinaryCodeMD5(), data, []):
-                if self.AppFrame is not None:
-                    self.AppFrame.CloseDebugTabs()
-                    self.AppFrame.RefreshInstancesTree()
                 self.UnsubscribeAllDebugIECVariable()
                 self.ProgramTransferred()
+                if self.AppFrame is not None:
+                    self.AppFrame.RefreshInstancesTree()
+                    self.AppFrame.CloseObsoleteDebugTabs()
                 self.logger.write(_("Transfer completed successfully.\n"))
             else:
                 self.logger.write_error(_("Transfer failed\n"))
--- a/plugger.py	Thu Feb 23 17:45:11 2012 +0100
+++ b/plugger.py	Tue Mar 06 22:42:56 2012 +0100
@@ -1815,11 +1815,12 @@
         self.DebugThread = None
 
     def KillDebugThread(self):
+        tmp_debugthread = self.DebugThread
         self.debug_break = True
-        if self.DebugThread is not None:
+        if tmp_debugthread is not None:
             self.logger.writeyield(_("Stopping debugger...\n"))
-            self.DebugThread.join(timeout=5)
-            if self.DebugThread.isAlive() and self.logger:
+            tmp_debugthread.join(timeout=5)
+            if tmp_debugthread.isAlive() and self.logger:
                 self.logger.write_warning(_("Couldn't stop debugger.\n"))
             else:
                 self.logger.write(_("Debugger stopped.\n"))