graphics/LD_Objects.py
changeset 368 591ba4003d74
parent 361 62570186dad4
child 379 e4c26ee9c998
equal deleted inserted replaced
367:2fdf57d0ce51 368:591ba4003d74
   408     
   408     
   409     def SetValue(self, value):
   409     def SetValue(self, value):
   410         self.PreviousValue = self.Value
   410         self.PreviousValue = self.Value
   411         self.Value = value
   411         self.Value = value
   412         if self.Value != self.PreviousValue:
   412         if self.Value != self.PreviousValue:
   413             self.Parent.UpdateRefreshRect(self.GetRedrawRect())
   413             if self.Visible:
       
   414                 self.Parent.UpdateRefreshRect(self.GetRedrawRect())
   414             self.SpreadCurrent()
   415             self.SpreadCurrent()
   415     
   416     
   416     def SpreadCurrent(self):
   417     def SpreadCurrent(self):
   417         if self.Parent.Debug:
   418         if self.Parent.Debug:
   418             if self.Value is None:
   419             if self.Value is None:
   714             self.Value = self.Input.ReceivingCurrent()
   715             self.Value = self.Input.ReceivingCurrent()
   715             if self.Value and not self.PreviousValue:
   716             if self.Value and not self.PreviousValue:
   716                 self.Output.SpreadCurrent(True)
   717                 self.Output.SpreadCurrent(True)
   717             elif not self.Value and self.PreviousValue:
   718             elif not self.Value and self.PreviousValue:
   718                 self.Output.SpreadCurrent(False)
   719                 self.Output.SpreadCurrent(False)
   719             if self.Value != self.PreviousValue:
   720             if self.Value != self.PreviousValue and self.Visible:
   720                 self.Parent.UpdateRefreshRect(self.GetRedrawRect())
   721                 self.Parent.UpdateRefreshRect(self.GetRedrawRect())
   721     
   722     
   722     # Make a clone of this LD_Coil
   723     # Make a clone of this LD_Coil
   723     def Clone(self, parent, id = None, pos = None):
   724     def Clone(self, parent, id = None, pos = None):
   724         coil = LD_Coil(parent, self.Type, self.Name, id)
   725         coil = LD_Coil(parent, self.Type, self.Name, id)