Ticket #10020: 10020.patch
File 10020.patch, 1.9 KB (added by , 6 years ago) |
---|
-
src/reverter/ChangesetReverter.java
73 73 private final OsmDataLayer layer; // data layer associated with reverter 74 74 private final DataSet ds; // DataSet associated with reverter 75 75 private final ChangesetDataSet cds; // Current changeset data 76 private final DataSet ods; // original DataSet, used if a new layer is requested 76 77 private DataSet nds; // Dataset that contains new objects downloaded by reverter 77 78 78 79 private final HashSet<PrimitiveId> missing = new HashSet<>(); … … 82 83 private final HashSet<HistoryOsmPrimitive> deleted = new HashSet<>(); 83 84 private final HashMap<PrimitiveId, Integer> earliestVersions = new HashMap<>(); 84 85 86 85 87 //// Handling missing objects 86 88 //////////////////////////////////////// 87 89 private void addIfMissing(PrimitiveId id) { … … 117 119 entry.getModificationType() == ChangesetModificationType.DELETED) { 118 120 return true; 119 121 } 120 OsmPrimitive p = ds.getPrimitiveById(entry.getPrimitive().getPrimitiveId());122 OsmPrimitive p = ods.getPrimitiveById(entry.getPrimitive().getPrimitiveId()); 121 123 if (p == null) return false; 122 124 return p.isSelected(); 123 125 } … … 141 143 this.layer = MainApplication.getLayerManager().getEditLayer(); 142 144 this.ds = layer.data; 143 145 } 146 if (revertType == RevertType.SELECTION || revertType == RevertType.SELECTION_WITH_UNDELETE) 147 this.ods = MainApplication.getLayerManager().getEditLayer().data; 148 else 149 this.ods = this.ds; 144 150 this.revertType = revertType; 145 151 146 152 OsmServerChangesetReader csr = new OsmServerChangesetReader(true);