mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Issues with circuit analysis introduced in version 4.0.1. Wires and
jumpers are made non-conductive by mistake.
This commit is contained in:
@@ -136,6 +136,6 @@ public class HookupWire extends AbstractCurvedComponent<Void> implements IContin
|
||||
|
||||
@Override
|
||||
public boolean arePointsConnected(int index1, int index2) {
|
||||
return index1 <= 1 && index2 <= 1;
|
||||
return Math.abs(index1 - index2) == getControlPointCount() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public class Jumper extends AbstractLeadedComponent<Void> implements IContinuity
|
||||
|
||||
@Override
|
||||
public boolean arePointsConnected(int index1, int index2) {
|
||||
return index1 <= 1 && index2 <= 1;
|
||||
return index1 <= 1 && index2 <= 1 && index1 != index2;
|
||||
}
|
||||
|
||||
public boolean getMoveLabel() {
|
||||
|
||||
@@ -436,6 +436,6 @@ public class TwistedWire extends AbstractCurvedComponent<Void> implements IConti
|
||||
|
||||
@Override
|
||||
public boolean arePointsConnected(int index1, int index2) {
|
||||
return index1 <= 1 && index2 <= 1;
|
||||
return Math.abs(index1 - index2) == getControlPointCount() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user