diff --git a/src/main/java/org/openstreetmap/josm/plugins/pt_assistant/actions/mendrelation/PublicTransportMendRelationAction.java b/src/main/java/org/openstreetmap/josm/plugins/pt_assistant/actions/mendrelation/PublicTransportMendRelationAction.java index a701a075..e8a794a0 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/pt_assistant/actions/mendrelation/PublicTransportMendRelationAction.java +++ b/src/main/java/org/openstreetmap/josm/plugins/pt_assistant/actions/mendrelation/PublicTransportMendRelationAction.java @@ -1120,18 +1120,17 @@ boolean isRestricted(Way currentWay, Way previousWay, Node commonNode) { else if (rel.hasTag("type", "restriction") && rel.hasKey("restriction")) return false; else { - boolean remove = true; String routeValue = relation.get("route"); for (String s : restrictions) { if (s.length() <= 12) continue; String sub = s.substring(12); if (routeValue.equals(sub) && rel.hasTag("type", s)) - remove = false; + return false; else if (routeValue.equals(sub) && rel.hasKey("restriction:" + sub)) - remove = false; + return false; } - return remove; + return true; } });