- Timestamp:
- 2009-11-08T19:55:39+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r2341 r2414 75 75 /** 76 76 * Find which node to merge into (i.e. which one will be left) 77 * The last selected node will become the target node the remaining 77 * The last selected node will become the target node the remaining 78 78 * nodes are merged to. 79 * 79 * 80 80 * @param candidates the collection of candidate nodes 81 81 * @return the selected target node … … 109 109 return null; 110 110 nodes.remove(null); // just in case 111 BackreferencedDataSet backreferences = new BackreferencedDataSet(layer.data); 112 backreferences.build(); 111 BackreferencedDataSet backreferences = new BackreferencedDataSet(); 113 112 return mergeNodes(layer,backreferences, nodes, targetNode); 114 113 } … … 207 206 return null; 208 207 if (backreferences == null) { 209 backreferences = new BackreferencedDataSet(layer.data); 210 backreferences.build(); 208 backreferences = new BackreferencedDataSet(); 211 209 } 212 210 -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r2343 r2414 10 10 11 11 import org.openstreetmap.josm.Main; 12 import org.openstreetmap.josm.actions.DownloadAction;13 12 import org.openstreetmap.josm.data.Bounds; 14 13 import org.openstreetmap.josm.data.coor.LatLon; … … 45 44 46 45 public Future<?> download(boolean newLayer, Bounds downloadArea, ProgressMonitor progressMonitor) { 47 46 48 47 downloadTask = new DownloadTask(newLayer, 49 48 new BoundingBoxDownloader(downloadArea), progressMonitor); -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r2333 r2414 55 55 */ 56 56 public DeleteCommand(Collection<? extends OsmPrimitive> data) throws IllegalArgumentException { 57 if (data == null) 57 if (data == null) 58 58 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be empty")); 59 59 if (data.isEmpty()) 60 throw new IllegalArgumentException(tr("At least one object to delete requird, got empty collection")); 60 throw new IllegalArgumentException(tr("At least one object to delete requird, got empty collection")); 61 61 this.toDelete = data; 62 62 } … … 101 101 public DeleteCommand(OsmDataLayer layer, Collection<? extends OsmPrimitive> data) throws IllegalArgumentException{ 102 102 super(layer); 103 if (data == null) 103 if (data == null) 104 104 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be empty")); 105 105 if (data.isEmpty()) 106 throw new IllegalArgumentException(tr("At least one object to delete requird, got empty collection")); 106 throw new IllegalArgumentException(tr("At least one object to delete requird, got empty collection")); 107 107 this.toDelete = data; 108 108 } … … 160 160 String msg = ""; 161 161 switch(OsmPrimitiveType.from(primitive)) { 162 163 164 162 case NODE: msg = "Delete node {0}"; break; 163 case WAY: msg = "Delete way {0}"; break; 164 case RELATION:msg = "Delete relation {0}"; break; 165 165 } 166 166 … … 181 181 apiname = t.getAPIName(); 182 182 switch(t) { 183 184 185 183 case NODE: msg = trn("Delete {0} node", "Delete {0} nodes", toDelete.size(), toDelete.size()); break; 184 case WAY: msg = trn("Delete {0} way", "Delete {0} ways", toDelete.size(), toDelete.size()); break; 185 case RELATION: msg = trn("Delete {0} relation", "Delete {0} relations", toDelete.size(), toDelete.size()); break; 186 186 } 187 187 } … … 316 316 return null; 317 317 318 BackreferencedDataSet backreferences = new BackreferencedDataSet(layer.data); 319 backreferences.build(); 320 318 BackreferencedDataSet backreferences = new BackreferencedDataSet(); 321 319 Set<OsmPrimitive> primitivesToDelete = new HashSet<OsmPrimitive>(selection); 322 320 Collection<Way> waysToBeChanged = new HashSet<Way>(); -
trunk/src/org/openstreetmap/josm/command/PurgePrimitivesCommand.java
r2198 r2414 178 178 public boolean executeCommand() { 179 179 if (backreferenceDataSet == null) { 180 backreferenceDataSet = new BackreferencedDataSet(getLayer().data); 181 backreferenceDataSet.build(); 180 backreferenceDataSet = new BackreferencedDataSet(); 182 181 } 183 182 HashSet<OsmPrimitive> hive = new HashSet<OsmPrimitive>(); -
trunk/src/org/openstreetmap/josm/data/osm/BackreferencedDataSet.java
r2411 r2414 85 85 86 86 /** 87 * Creates a new backreference data set based on the dataset <code>source</code>.88 *89 * @param source the source. Ignored90 */91 public BackreferencedDataSet(DataSet source) {92 93 }94 95 /**96 * @deprecated It's not necessary to call this method, OsmPrimitive.getReferres() is used to get list of referrers97 */98 @Deprecated99 public void build() {100 101 }102 103 /**104 87 * Replies the set of parent primitives for a given child primitive. Replies 105 88 * an empty set if no parents refer to the child. -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r2396 r2414 391 391 */ 392 392 protected PurgePrimitivesCommand buildPurgeCommand() { 393 BackreferencedDataSet ds = new BackreferencedDataSet(data); 394 ds.build(); 393 BackreferencedDataSet ds = new BackreferencedDataSet(); 395 394 ArrayList<OsmPrimitive> toPurge = new ArrayList<OsmPrimitive>(); 396 395 conflictLoop: for (Conflict<?> c: conflicts) {
Note:
See TracChangeset
for help on using the changeset viewer.