Extend removal mechanism for all wires.
This commit is contained in:
parent
8b3bbfee78
commit
af9352de42
@ -368,9 +368,7 @@ public class CanvasView extends View implements PartGrid {
|
||||
List<OutputConnector> outputConnectors = part.getOutputConnectors();
|
||||
if (outputConnectors != null) {
|
||||
for (OutputConnector outputConnector : outputConnectors) {
|
||||
if (outputConnector instanceof SignalRoundOutputConnector) {
|
||||
SignalRoundOutputConnector conn = (SignalRoundOutputConnector) outputConnector;
|
||||
List<SignalWire> wires = conn.getWires();
|
||||
List<SignalWire> wires = outputConnector.getWires();
|
||||
if (wires == null) {
|
||||
continue;
|
||||
}
|
||||
@ -383,7 +381,6 @@ public class CanvasView extends View implements PartGrid {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ public class AnyRoundOutputConnector implements Drawable, AnyOutputConnector,
|
||||
@Override
|
||||
public void unlinkWire(AnyWire wire) {
|
||||
_wires.remove(wire);
|
||||
_connections.remove(wire.getAttachedTo());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -162,6 +163,11 @@ public class AnyRoundOutputConnector implements Drawable, AnyOutputConnector,
|
||||
return _part.query(lastValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnyWire> getWires() {
|
||||
return _wires;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return _centerX;
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ public class BooleanRoundOutputConnector implements Drawable, BooleanOutputConne
|
||||
@Override
|
||||
public void unlinkWire(BooleanWire wire) {
|
||||
_wires.remove(wire);
|
||||
_connections.remove(wire.getAttachedTo());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -160,4 +161,9 @@ public class BooleanRoundOutputConnector implements Drawable, BooleanOutputConne
|
||||
public Object query(Object lastValue) {
|
||||
return _part.query(lastValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BooleanWire> getWires() {
|
||||
return _wires;
|
||||
}
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ public class StringRoundOutputConnector implements Drawable, StringOutputConnect
|
||||
@Override
|
||||
public void unlinkWire(StringWire wire) {
|
||||
_wires.remove(wire);
|
||||
_connections.remove(wire.getAttachedTo());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -160,4 +161,9 @@ public class StringRoundOutputConnector implements Drawable, StringOutputConnect
|
||||
public Object query(Object lastValue) {
|
||||
return _part.query(lastValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StringWire> getWires() {
|
||||
return _wires;
|
||||
}
|
||||
}
|
||||
|
@ -25,4 +25,6 @@ public interface OutputConnector<T extends WireDataType,
|
||||
void send(T data);
|
||||
|
||||
Object query(Object lastValue);
|
||||
|
||||
List<T2> getWires();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user