Changeset 34883 in osm for applications
- Timestamp:
- 2019-02-07T11:19:20+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java
r34881 r34883 19 19 import org.openstreetmap.josm.data.osm.DataSet; 20 20 import org.openstreetmap.josm.data.osm.Node; 21 import org.openstreetmap.josm.data.osm.NodeData; 21 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 22 23 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 87 88 88 89 if (visible) { 89 // If the object is not deleted we get the real object 90 DownloadPrimitivesTask download = new DownloadPrimitivesTask(layer, Collections.singletonList(pid), true); 91 download.setZoom(false); 92 download.run(); 93 94 primitive = layer.data.getPrimitiveById(id, type); 90 if (type == OsmPrimitiveType.NODE) { 91 // we have all needed information in the history object 92 primitive = new Node(hPrimitive1.getId()); 93 HistoryNode hNode = (HistoryNode) hPrimitive1; 94 primitive.load(hNode.fillPrimitiveData(new NodeData())); 95 layer.data.addPrimitive(primitive); 96 } else { 97 // If the way or relation is not deleted we get the real object 98 DownloadPrimitivesTask download = new DownloadPrimitivesTask(layer, Collections.singletonList(pid), true); 99 download.setZoom(false); 100 download.run(); 101 primitive = layer.data.getPrimitiveById(id, type); 102 } 95 103 restored.add(primitive); 96 104 } else {
Note:
See TracChangeset
for help on using the changeset viewer.