Commit aa51028e authored by Bruno Coudoin's avatar Bruno Coudoin

Improved electric. Now it's possible to connect/unconnect components

parent bffdb7db
boards/electric/bulb.png

13.2 KB | W: | H:

boards/electric/bulb.png

12.7 KB | W: | H:

boards/electric/bulb.png
boards/electric/bulb.png
boards/electric/bulb.png
boards/electric/bulb.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -322,7 +322,8 @@ class Wire:
if self.wire_id >= 0:
# This node was already connected elsewhere, reset it to use our wire_id
for wire in node.get_wires():
if wire.get_wire_id() != wire_id:
print " Was connected to %d" %(wire.get_wire_id(),)
if wire.get_wire_id() != self.wire_id:
wire.set_wire_id(self.wire_id)
else:
if wire_id == -1:
......@@ -398,6 +399,8 @@ class Wire:
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 1:
wire.destroy()
elif event.button == 3:
print "WIRE_ID = %d" %self.wire_id
return False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment