graphics/GraphicCommons.py
changeset 1089 5cd1f8df71aa
parent 1069 880ec628d490
child 1102 cd4a996ddaa7
--- a/graphics/GraphicCommons.py	Thu May 02 14:00:05 2013 +0200
+++ b/graphics/GraphicCommons.py	Thu May 02 14:06:24 2013 +0200
@@ -327,7 +327,7 @@
             if producer is not None:
                 producer.SubscribeDebugIECVariable("__tick__", self)
             if self.DataProducer is not None:
-                self.DataProducer.UnsubscribeDebugIECVariable("__tick__", self)        
+                self.DataProducer.UnsubscribeDebugIECVariable("__tick__", self)
         self.DataProducer = producer
     
     def IsDebugging(self):
@@ -353,7 +353,8 @@
             self.DataProducer.UnsubscribeDebugIECVariable(iec_path, consumer)
     
     def RegisterVariables(self):
-        pass
+        if self.RegisterTick and self.Debug and self.DataProducer is not None:
+            self.DataProducer.SubscribeDebugIECVariable("__tick__", self)
     
     def GetDataType(self, iec_path):
         if self.DataProducer is not None: