Fixed bug when closing debug tab or beremiz frame with variable debugged and PLC is running
authorLaurent Bessard
Mon, 03 Jun 2013 08:35:23 +0200
changeset 1210 9a35da8f714b
parent 1209 953a8f14040a
child 1211 e3f805ba74ca
Fixed bug when closing debug tab or beremiz frame with variable debugged and PLC is running
editors/DebugViewer.py
--- a/editors/DebugViewer.py	Mon Jun 03 00:30:55 2013 +0200
+++ b/editors/DebugViewer.py	Mon Jun 03 08:35:23 2013 +0200
@@ -186,14 +186,14 @@
         """
         if self.DataProducer is not None:
             
+            # Unscribe tick if needed
+            if self.SubscribeTick and tick and self.Debug:
+                self.DataProducer.UnsubscribeDebugIECVariable("__tick__", self)
+            
             # Unsubscribe all data consumers in list
             for consumer, iec_path in self.DataConsumers.iteritems():
                 self.DataProducer.UnsubscribeDebugIECVariable(
                             iec_path, consumer)
-            
-            # Unscribe tick if needed
-            if self.SubscribeTick and tick and self.Debug:
-                self.DataProducer.UnsubscribeDebugIECVariable("__tick__", self)
         
         self.DataConsumers = {}