- Timestamp:
- 2018-04-21T02:42:26+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r13651 r13654 239 239 Layer layer = e.getRemovedLayer(); 240 240 if (layer instanceof OsmDataLayer) { 241 undoRedo.clean(((OsmDataLayer) layer). data);241 undoRedo.clean(((OsmDataLayer) layer).getDataSet()); 242 242 } 243 243 } -
trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveDataPaster.java
r12725 r13654 83 83 } 84 84 } 85 return new AddPrimitivesCommand(bufferCopy, toSelect, layer. data);85 return new AddPrimitivesCommand(bufferCopy, toSelect, layer.getDataSet()); 86 86 } 87 87 -
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/DuplicateAction.java
r13130 r13654 55 55 String newName = LayerListTransferHandler.suggestNewLayerName(layer.getName(), MainApplication.getLayerManager().getLayers()); 56 56 OsmDataLayer oldLayer = (OsmDataLayer) layer; 57 MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(oldLayer. data), newName, null));57 MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(oldLayer.getDataSet()), newName, null)); 58 58 } 59 59 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java
r12620 r13654 138 138 if (layer instanceof OsmDataLayer) { 139 139 String newName = suggestNewLayerName(layer.getName(), layerNames); 140 OsmDataLayer newLayer = new OsmDataLayer(new DataSet(((OsmDataLayer) layer). data), newName, null);140 OsmDataLayer newLayer = new OsmDataLayer(new DataSet(((OsmDataLayer) layer).getDataSet()), newName, null); 141 141 layers.add(newLayer); 142 142 layerNames.add(newName); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
r13171 r13654 399 399 400 400 /** 401 * Merges the primitives in <code>ds</code> to the dataset of the 402 * edit layer 401 * Merges the primitives in <code>ds</code> to the dataset of the edit layer 403 402 * 404 403 * @param ds the data set … … 406 405 protected void mergeDataSet(DataSet ds) { 407 406 if (ds != null) { 408 final DataSetMerger visitor = new DataSetMerger(getLayer(). data, ds);407 final DataSetMerger visitor = new DataSetMerger(getLayer().getDataSet(), ds); 409 408 visitor.merge(); 410 409 if (!visitor.getConflicts().isEmpty()) { … … 465 464 protected void mergeDataSet(DataSet dataSet) { 466 465 if (dataSet != null) { 467 final DataSetMerger visitor = new DataSetMerger(getLayer(). data, dataSet);466 final DataSetMerger visitor = new DataSetMerger(getLayer().getDataSet(), dataSet); 468 467 visitor.merge(); 469 468 if (!visitor.getConflicts().isEmpty()) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r13486 r13654 161 161 referrers = reader.parseOsm(progressMonitor.createSubTaskMonitor(1, false)); 162 162 if (referrers != null) { 163 final DataSetMerger visitor = new DataSetMerger(getLayer(). data, referrers);163 final DataSetMerger visitor = new DataSetMerger(getLayer().getDataSet(), referrers); 164 164 visitor.merge(); 165 165 166 166 // copy the merged layer's data source info 167 getLayer(). data.addDataSources(referrers.getDataSources());167 getLayer().getDataSet().addDataSources(referrers.getDataSources()); 168 168 // FIXME: this is necessary because there are dialogs listening 169 169 // for DataChangeEvents which manipulate Swing components on this thread. -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java
r12726 r13654 73 73 if (newRelation.getMembersCount() == 0 && !newRelation.hasKeys()) 74 74 return; 75 MainApplication.undoRedo.add(new AddCommand(layer. data, newRelation));75 MainApplication.undoRedo.add(new AddCommand(layer.getDataSet(), newRelation)); 76 76 77 77 // make sure everybody is notified about the changes … … 95 95 memberTableModel.applyToRelation(editedRelation); 96 96 Conflict<Relation> conflict = new Conflict<>(editor.getRelation(), editedRelation); 97 MainApplication.undoRedo.add(new ConflictAddCommand(layer. data, conflict));97 MainApplication.undoRedo.add(new ConflictAddCommand(layer.getDataSet(), conflict)); 98 98 } 99 99 -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r13434 r13654 619 619 if (oldLayer instanceof OsmDataLayer) { 620 620 OsmDataLayer l = (OsmDataLayer) oldLayer; 621 l. data.removeDataSetListener(this);621 l.getDataSet().removeDataSetListener(this); 622 622 } 623 623 Layer newLayer = e.getSource().getActiveLayer(); … … 628 628 } 629 629 OsmDataLayer l = (OsmDataLayer) newLayer; 630 l. data.addDataSetListener(this);630 l.getDataSet().addDataSetListener(this); 631 631 OsmPrimitive primitive = history != null ? l.data.getPrimitiveById(history.getId(), history.getType()) : null; 632 632 HistoryOsmPrimitive newLatest; -
trunk/src/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTask.java
r13146 r13654 123 123 GuiHelper.runInEDTAndWait(() -> { 124 124 // Remove the commands from the undo stack 125 MainApplication.undoRedo.clean(uploadDataLayer. data);125 MainApplication.undoRedo.clean(uploadDataLayer.getDataSet()); 126 126 MainApplication.getLayerManager().prepareLayerForUpload(uploadDataLayer); 127 127 -
trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
r12687 r13654 107 107 public void run() { 108 108 monitor.indeterminateSubTask(tr("Preparing objects to upload ...")); 109 APIDataSet ds = new APIDataSet(layer. data);109 APIDataSet ds = new APIDataSet(layer.getDataSet()); 110 110 try { 111 111 ds.adjustRelationUploadOrder(); -
trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java
r13647 r13654 298 298 private void registerNewlayer(OsmDataLayer layer) { 299 299 synchronized (layersLock) { 300 layer. data.addDataSetListener(datasetAdapter);300 layer.getDataSet().addDataSetListener(datasetAdapter); 301 301 layersInfo.add(new AutosaveLayerInfo<>(layer)); 302 302 } … … 324 324 synchronized (layersLock) { 325 325 OsmDataLayer osmLayer = (OsmDataLayer) e.getRemovedLayer(); 326 osmLayer. data.removeDataSetListener(datasetAdapter);326 osmLayer.getDataSet().removeDataSetListener(datasetAdapter); 327 327 cleanupLayer(osmLayer); 328 328 } -
trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java
r13453 r13654 114 114 public DataSet getPreviousDataSet() { 115 115 if (previousDataLayer != null) { 116 return previousDataLayer. data;116 return previousDataLayer.getDataSet(); 117 117 } else { 118 118 return null; … … 403 403 public synchronized DataSet getEditDataSet() { 404 404 if (dataLayer != null && !dataLayer.isLocked()) { 405 return dataLayer. data;405 return dataLayer.getDataSet(); 406 406 } else { 407 407 return null; … … 417 417 public synchronized DataSet getActiveDataSet() { 418 418 if (dataLayer != null) { 419 return dataLayer. data;419 return dataLayer.getDataSet(); 420 420 } else { 421 421 return null;
Note:
See TracChangeset
for help on using the changeset viewer.