LDViewer.py
changeset 616 8a60ffcfd70b
parent 586 9aa96a36cf33
child 650 aaa3b02d42b1
equal deleted inserted replaced
615:8baeb9dff775 616:8a60ffcfd70b
   895 
   895 
   896     def DeleteContact(self, contact):
   896     def DeleteContact(self, contact):
   897         if self.GetDrawingMode() == FREEDRAWING_MODE:
   897         if self.GetDrawingMode() == FREEDRAWING_MODE:
   898             Viewer.DeleteContact(self, contact)
   898             Viewer.DeleteContact(self, contact)
   899         else:
   899         else:
   900             print "Delete"
       
   901             rungindex = self.FindRung(contact)
   900             rungindex = self.FindRung(contact)
   902             rung = self.Rungs[rungindex]
   901             rung = self.Rungs[rungindex]
   903             old_bbox = rung.GetBoundingBox()
   902             old_bbox = rung.GetBoundingBox()
   904             connectors = contact.GetConnectors()
   903             connectors = contact.GetConnectors()
   905             input_wires = [wire for wire, handle in connectors["inputs"][0].GetWires()]
   904             input_wires = [wire for wire, handle in connectors["inputs"][0].GetWires()]