implemented action-based startup of routes

This commit is contained in:
Stephan Richter
2020-11-13 14:41:17 +01:00
parent f2ee754064
commit bb983c9736
14 changed files with 234 additions and 81 deletions

View File

@@ -6,7 +6,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeSet;
import java.util.Vector;
import org.json.JSONArray;
@@ -291,11 +290,7 @@ public abstract class Block extends StretchableTile implements Comparable<Block>
if (isNull(exclude)) exclude = new Vector<Block>();
Select select = new Select(Block.class.getSimpleName());
new Tag("option").attr("value","0").content(t("unset")).addTo(select);
TreeSet<Block> blocks = new TreeSet<Block>();
for (Tile tile : plan.tiles.values()) {
if (tile instanceof Block) blocks.add((Block) tile);
}
for (Block block : blocks) {
for (Block block : plan.blocks()) {
if (exclude.contains(block)) continue;
Tag opt = select.addOption(block.id(), block);
if (block == preselected) opt.attr("selected", "selected");