fix LD debug viewer (broken by 25ffba)
authorb.taylor@willowglen.ca
Mon, 21 Sep 2009 10:31:38 -0600
changeset 432 f4c0e9c9b3b9
parent 430 8efd4c6874cd
child 433 26bc7d5d4264
child 439 c7e0254be378
fix LD debug viewer (broken by 25ffba)
Viewer.py
--- a/Viewer.py	Fri Sep 18 10:31:01 2009 -0600
+++ b/Viewer.py	Mon Sep 21 10:31:38 2009 -0600
@@ -818,7 +818,11 @@
                 wire.SetValid(False)
             if self.Debug:
                 iec_path = self.GetElementIECPath(wire)
-                if self.AddDataConsumer(iec_path.upper(), wire) is None:
+                if iec_path is None:
+                    block = wire.EndConnected.GetParentBlock()
+                    if isinstance(block, LD_PowerRail):
+                        wire.SetValue(True)
+                elif self.AddDataConsumer(iec_path.upper(), wire) is None:
                     wire.SetValue("undefined")
 
         if self.Debug: