--- a/LDViewer.py Fri Jul 20 19:10:00 2007 +0200
+++ b/LDViewer.py Fri Jul 20 22:24:39 2007 +0200
@@ -472,7 +472,7 @@
end_connector.Connect((wire, -1), False)
wire.ConnectStartPoint(None, start_connector)
wire.ConnectEndPoint(None, end_connector)
- self.AddWires(wire)
+ self.AddWire(wire)
rung.SelectElement(wire)
# Create RightPowerRail
id = self.GetNewId()
@@ -489,7 +489,7 @@
end_connector.Connect((wire, -1), False)
wire.ConnectStartPoint(None, start_connector)
wire.ConnectEndPoint(None, end_connector)
- self.AddWires(wire)
+ self.AddWire(wire)
rung.SelectElement(wire)
self.RefreshPosition(coil)
self.Rungs.append(rung)
@@ -873,7 +873,7 @@
wire.ConnectEndPoint(None, left_element)
wires.reverse()
for wire in wires:
- self.RemoveWire(wire)
+ self.AddWire(wire)
rung.SelectElement(wire)
right_elements.reverse()
for right_element, right_index in right_elements:
--- a/TextViewer.py Fri Jul 20 19:10:00 2007 +0200
+++ b/TextViewer.py Fri Jul 20 22:24:39 2007 +0200
@@ -122,7 +122,10 @@
EVT_KILL_FOCUS(self, self.OnKillFocus)
def OnDoDrop(self, event):
- values = eval(event.GetDragText())
+ try:
+ values = eval(event.GetDragText())
+ except:
+ values = event.GetDragText()
if isinstance(values, tuple):
if values[1] in ["functionBlock", "program"]:
event.SetDragText("")
--- a/graphics/LD_Objects.py Fri Jul 20 19:10:00 2007 +0200
+++ b/graphics/LD_Objects.py Fri Jul 20 22:24:39 2007 +0200
@@ -431,6 +431,7 @@
# Changes the contact type
def SetType(self, type):
self.Type = type
+ self.RefreshTypeSize()
# Returns the contact type
def GetType(self):