Ticket #17580: 17580.patch
File 17580.patch, 1.5 KB (added by , 6 years ago) |
---|
-
src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java
46 46 import org.openstreetmap.josm.tools.Pair; 47 47 import org.openstreetmap.josm.tools.Shortcut; 48 48 import org.openstreetmap.josm.tools.UserCancelException; 49 import org.openstreetmap.josm.tools.Utils; 49 50 50 51 /** 51 52 * Terraces a quadrilateral, closed way into a series of quadrilateral, … … 118 119 119 120 outline = (Way) prim; 120 121 } else if (sel.size() > 1) { 121 List<Way> ways = OsmPrimitive.getFilteredList(sel, Way.class);122 List<Way> ways = new ArrayList<>(Utils.filteredCollection(sel, Way.class)); 122 123 Iterator<Way> wit = ways.iterator(); 123 124 while (wit.hasNext()) { 124 125 Way way = wit.next(); … … 142 143 if (outline == null) 143 144 throw new InvalidUserInputException("no outline way found"); 144 145 145 List<Node> nodes = OsmPrimitive.getFilteredList(sel, Node.class);146 List<Node> nodes = new ArrayList<>(Utils.filteredCollection(sel, Node.class)); 146 147 Iterator<Node> nit = nodes.iterator(); 147 148 // Actually this should test if the selected address nodes lie 148 149 // within the selected outline. Any ideas how to do this?