- Timestamp:
- 2021-07-11T14:39:42+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r17981 r18001 238 238 * @param ways ways to clone 239 239 * @param relations relations to clone 240 * @since 17981 241 */ 242 public void clonePrimitives(Iterable<Node> nodes, Iterable<Way> ways, Iterable<Relation> relations) { 240 * @return the map of cloned primitives indexed by their original version 241 * @since 18001 242 */ 243 public Map<OsmPrimitive, OsmPrimitive> clonePrimitives(Iterable<Node> nodes, Iterable<Way> ways, Iterable<Relation> relations) { 243 244 Map<OsmPrimitive, OsmPrimitive> primMap = new HashMap<>(); 244 245 for (Node n : nodes) { … … 268 269 .collect(Collectors.toList())); 269 270 } 271 return primMap; 270 272 } 271 273 -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetValidation.java
r17981 r18001 80 80 DataSet ds = new DataSet(); 81 81 Collection<OsmPrimitive> primitives = FilterModel.getAffectedPrimitives(singleton(original)); 82 ds.clonePrimitives(82 OsmPrimitive primitive = ds.clonePrimitives( 83 83 new SubclassFilteredCollection<>(primitives, INode.class::isInstance), 84 84 new SubclassFilteredCollection<>(primitives, IWay.class::isInstance), 85 new SubclassFilteredCollection<>(primitives, IRelation.class::isInstance)) ;86 OsmPrimitive primitive = ds.getPrimitiveById(original.getOsmPrimitiveId());85 new SubclassFilteredCollection<>(primitives, IRelation.class::isInstance)) 86 .get(original); 87 87 Command command = TaggingPreset.createCommand(singleton(primitive), changedTags); 88 88 if (command != null) {
Note:
See TracChangeset
for help on using the changeset viewer.