bugfix
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.srsoftware</groupId>
|
<groupId>de.srsoftware</groupId>
|
||||||
<artifactId>web4rail</artifactId>
|
<artifactId>web4rail</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.5.1</version>
|
||||||
<name>Web4Rail</name>
|
<name>Web4Rail</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>Java Model Railway Control</description>
|
<description>Java Model Railway Control</description>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class FunctionList extends HashSet<Function> implements Constants{
|
|||||||
public FunctionList toggle(String name) {
|
public FunctionList toggle(String name) {
|
||||||
boolean enabled = !enabledFunctions.remove(name);
|
boolean enabled = !enabledFunctions.remove(name);
|
||||||
if (enabled) enabledFunctions.add(name);
|
if (enabled) enabledFunctions.add(name);
|
||||||
stream().filter(fun -> name.equals(fun.name())).forEach(fun -> fun.setState(enabled));
|
for (Function fun : with(name)) fun.setState(enabled);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
|||||||
if (isSet(car)) {
|
if (isSet(car)) {
|
||||||
cars.add(car);
|
cars.add(car);
|
||||||
car.train(this);
|
car.train(this);
|
||||||
|
updateEnds();
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user