mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-16 08:25:09 -04:00
recalculate wires if wires are deleted
This commit is contained in:
parent
155da59840
commit
c5f7c7f6a6
@ -309,12 +309,21 @@ public class Circuit {
|
||||
if (veIt.next().matches(min, max))
|
||||
veIt.remove();
|
||||
|
||||
boolean wireDeleted = false;
|
||||
Iterator<Wire> wIt = wires.iterator();
|
||||
while (wIt.hasNext()) {
|
||||
Wire w = wIt.next();
|
||||
if (w.p1.inside(min, max) || w.p2.inside(min, max))
|
||||
if (w.p1.inside(min, max) || w.p2.inside(min, max)) {
|
||||
wIt.remove();
|
||||
wireDeleted = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (wireDeleted) {
|
||||
WireConsistencyChecker checker = new WireConsistencyChecker(wires);
|
||||
wires = checker.check();
|
||||
}
|
||||
|
||||
dotsPresent = false;
|
||||
modified();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user