bugfixes
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.2.13</version>
|
||||
<version>1.2.14</version>
|
||||
<name>Web4Rail</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>Java Model Railway Control</description>
|
||||
|
||||
@@ -105,7 +105,9 @@ public class Route extends BaseClass implements Comparable<Route>{
|
||||
train.setSpeed(0);
|
||||
if (aborted) return;
|
||||
long runtime = timestamp2 - timestamp;
|
||||
int newTimeStep = 5*(int) runtime/(startSpeed - ENDSPEED);
|
||||
int quotient = startSpeed - ENDSPEED;
|
||||
if (quotient<1) quotient = 1;
|
||||
int newTimeStep = 5*(int) runtime/quotient;
|
||||
|
||||
int diff = newTimeStep - timeStep;
|
||||
int absDiff = diff < 0 ? -diff : diff;
|
||||
|
||||
@@ -754,8 +754,8 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
nextRoute = null;
|
||||
}
|
||||
if (isSet(route)) {
|
||||
route.reset();
|
||||
route.brakeCancel();
|
||||
route.reset();
|
||||
route = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class StretchableTile extends Tile {
|
||||
|
||||
@Override
|
||||
protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) {
|
||||
formInputs.add(stretchType(),new Input(STRETCH_LENGTH, stretch).addTo(new Tag("span")).content(NBSP+t("Tile(s)")));
|
||||
formInputs.add(stretchType(),new Input(STRETCH_LENGTH, stretch).numeric().addTo(new Tag("span")).content(NBSP+t("Tile(s)")));
|
||||
return super.properties(preForm, formInputs, postForm);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user