minor improvement
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.srsoftware</groupId>
|
||||
<artifactId>web4rail</artifactId>
|
||||
<version>1.4.5</version>
|
||||
<version>1.4.6</version>
|
||||
<name>Web4Rail</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>Java Model Railway Control</description>
|
||||
|
||||
@@ -839,8 +839,11 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
public Train reverse() {
|
||||
LOG.debug("train.reverse();");
|
||||
|
||||
if (isSet(direction)) direction = direction.inverse();
|
||||
if (isSet(currentBlock)) plan.place(currentBlock);
|
||||
if (isSet(direction)) direction = direction.inverse();
|
||||
if (isSet(currentBlock)) {
|
||||
if (isNull(direction)) direction = currentBlock.directionA();
|
||||
plan.place(currentBlock);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user