X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model.editor%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Feditor%2Fhandles%2FWirePointHandle.java;h=0779247f755e49cb2f3903b190ce82ac0af0cb48;hb=c5c0d07286a29994a11ba8b01eaffb21964b6c1b;hp=24575797bf40e538a8dd88abece335369e2ae2da;hpb=a393b0a2a9899707af54c9ee77a01f28ac967bd1;p=Mograsim.git diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WirePointHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WirePointHandle.java index 24575797..0779247f 100644 --- a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WirePointHandle.java +++ b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WirePointHandle.java @@ -11,14 +11,16 @@ import net.mograsim.logic.model.model.wires.GUIWire; public class WirePointHandle extends Handle { private final static int END_OFFSET = 4; + private final HandleManager manager; private boolean selected = false; public final GUIWire parent; private int pointIndex; - public WirePointHandle(GUIWire parent, int pointIndex) + public WirePointHandle(HandleManager manager, GUIWire parent, int pointIndex) { super(); + this.manager = manager; this.parent = parent; this.pointIndex = pointIndex; setSize(END_OFFSET, END_OFFSET); @@ -63,7 +65,7 @@ public class WirePointHandle extends Handle @Override public void reqDelete() { - parent.removePathPoint(pointIndex); + manager.destroyWirePointHandle(parent, this); } @Override