Changeset 34926 in osm for applications/editors/josm
- Timestamp:
- 2019-03-20T20:34:00+01:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/RoadGui.java
r33294 r34926 36 36 37 37 import org.openstreetmap.josm.data.osm.Node; 38 import org.openstreetmap.josm.data.osm.OsmPrimitive;39 38 import org.openstreetmap.josm.data.osm.Way; 40 39 import org.openstreetmap.josm.plugins.turnlanes.model.Lane; … … 629 628 630 629 final Node n = end.getJunction().getNode(); 631 for (Way w : OsmPrimitive.getFilteredList(n.getReferrers(), Way.class)) {630 for (Way w : org.openstreetmap.josm.tools.Utils.filteredCollection(n.getReferrers(), Way.class)) { 632 631 if (w.getNodesCount() > 1 && !end.getWay().equals(w) && w.isFirstLastNode(n) && Utils.isRoad(w)) { 633 632 final Node nextNode = w.firstNode().equals(n) ? w.getNode(1) : w.getNode(w.getNodesCount() - 2); -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java
r34288 r34926 9 9 import java.awt.event.ActionEvent; 10 10 import java.util.Collection; 11 import java.util.Collections;12 11 import java.util.HashSet; 13 import java.util.List;14 12 import java.util.Set; 15 13 … … 178 176 void refresh() { 179 177 if (isShowing && editing) { 180 final Collection<OsmPrimitive> s = Collections.unmodifiableCollection(selected); 181 final List<Node> nodes = OsmPrimitive.getFilteredList(s, Node.class); 182 final List<Way> ways = OsmPrimitive.getFilteredList(s, Way.class); 178 final Collection<Node> nodes = org.openstreetmap.josm.tools.Utils.filteredCollection(selected, Node.class); 179 final Collection<Way> ways = org.openstreetmap.josm.tools.Utils.filteredCollection(selected, Way.class); 183 180 184 181 final ModelContainer mc = nodes.isEmpty() ? ModelContainer.empty() : ModelContainer -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/ModelContainer.java
r33085 r34926 61 61 boolean closed = true; 62 62 63 for (Relation r : OsmPrimitive.getFilteredList(w.getReferrers(), Relation.class)) {63 for (Relation r : org.openstreetmap.josm.tools.Utils.filteredCollection(w.getReferrers(), Relation.class)) { 64 64 if (!r.get("type").equals(Constants.TYPE_TURNS)) { 65 65 continue; -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Turn.java
r34566 r34926 24 24 final Set<Turn> result = new HashSet<>(); 25 25 26 for (Relation r : OsmPrimitive.getFilteredList(primitive.getReferrers(), Relation.class)) {26 for (Relation r : org.openstreetmap.josm.tools.Utils.filteredCollection(primitive.getReferrers(), Relation.class)) { 27 27 if (!r.isUsable() || !r.get("type").equals(Constants.TYPE_TURNS)) { 28 28 continue;
Note:
See TracChangeset
for help on using the changeset viewer.