Issues with connectivity check with some components (e.g. Jumper) where

the middle of the component was considered as a connected point
This commit is contained in:
bancika
2020-03-27 10:08:22 +01:00
parent 47072a3b3e
commit 0f0739c978
4 changed files with 20 additions and 4 deletions
@@ -2764,6 +2764,22 @@
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
<org.diylc.appframework.update.Version>
<versionNumber>
<major>4</major>
<minor>1</minor>
<build>0</build>
</versionNumber>
<releaseDate>2020-03-26 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Issues with connectivity check with some components (e.g. Jumper) where the middle of the component was considered as a connected point</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
</a>
</java.util.Arrays_-ArrayList>
@@ -136,6 +136,6 @@ public class HookupWire extends AbstractCurvedComponent<Void> implements IContin
@Override
public boolean arePointsConnected(int index1, int index2) {
return Math.abs(index1 - index2) == getControlPointCount() - 1;
return index1 <= 1 && index2 <= 1;
}
}
@@ -161,7 +161,7 @@ public class Jumper extends AbstractLeadedComponent<Void> implements IContinuity
@Override
public boolean arePointsConnected(int index1, int index2) {
return true;
return index1 <= 1 && index2 <= 1;
}
public boolean getMoveLabel() {
@@ -436,6 +436,6 @@ public class TwistedWire extends AbstractCurvedComponent<Void> implements IConti
@Override
public boolean arePointsConnected(int index1, int index2) {
return Math.abs(index1 - index2) == getControlPointCount() - 1;
}
return index1 <= 1 && index2 <= 1;
}
}