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.2.14</version>
|
<version>1.2.15</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>
|
||||||
|
|||||||
@@ -448,7 +448,9 @@ public class Route extends BaseClass implements Comparable<Route>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean fireSetupActions(Context context) {
|
public boolean fireSetupActions(Context context) {
|
||||||
return triggeredActions.get(ROUTE_SETUP).fire(context);
|
ActionList setupActions = triggeredActions.get(ROUTE_SETUP);
|
||||||
|
if (isNull(setupActions)) return true;
|
||||||
|
return setupActions.fire(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String generateName() {
|
private String generateName() {
|
||||||
@@ -863,7 +865,12 @@ public class Route extends BaseClass implements Comparable<Route>{
|
|||||||
public boolean train(Train newTrain) {
|
public boolean train(Train newTrain) {
|
||||||
if (isSet(train) && newTrain != train) return false;
|
if (isSet(train) && newTrain != train) return false;
|
||||||
train = newTrain;
|
train = newTrain;
|
||||||
return isSet(train) ? triggeredActions.get(ROUTE_START).fire(new Context(this).train(train)) : true;
|
if (isSet(train)) {
|
||||||
|
ActionList startActions = triggeredActions.get(ROUTE_START);
|
||||||
|
if (isNull(startActions)) return true;
|
||||||
|
return startActions.fire(new Context(this).train(train));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Route unlock() throws IOException {
|
public Route unlock() throws IOException {
|
||||||
|
|||||||
Reference in New Issue
Block a user