bugfixes
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.3.34</version>
|
<version>1.3.35</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>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class ConditionalAction extends ActionList {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
if (conditions.isEmpty()) return "["+t("Click here to add conditions")+"]";
|
if (conditions.isEmpty()) return "["+t("Click here to add conditions")+"]";
|
||||||
return t("if ({})",conditions)+COL;
|
return t("if ({})",conditions)+": ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import de.srsoftware.web4rail.moving.Train;
|
||||||
import de.srsoftware.web4rail.tags.Fieldset;
|
import de.srsoftware.web4rail.tags.Fieldset;
|
||||||
import de.srsoftware.web4rail.tags.Input;
|
import de.srsoftware.web4rail.tags.Input;
|
||||||
import de.srsoftware.web4rail.tags.Window;
|
import de.srsoftware.web4rail.tags.Window;
|
||||||
@@ -16,8 +17,11 @@ public class TrainHasTag extends Condition {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean fulfilledBy(Context context) {
|
public boolean fulfilledBy(Context context) {
|
||||||
if (tag == null) return true;
|
if (isNull(tag)) return true;
|
||||||
return context.train().tags().contains(tag) != inverted;
|
Train train = context.train();
|
||||||
|
if (isNull(train)) return false;
|
||||||
|
if (isNull(train.tags())) return false;
|
||||||
|
return train.tags().contains(tag) != inverted;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user