Changeset 17528 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java
- Timestamp:
- 2009-09-08T23:14:16+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java
r17365 r17528 16 16 import org.openstreetmap.josm.actions.UploadAction.UploadHook; 17 17 import org.openstreetmap.josm.command.ChangePropertyCommand; 18 import org.openstreetmap.josm.data.APIDataSet; 18 19 import org.openstreetmap.josm.data.osm.Node; 19 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 35 36 * Add the tag "source" if it doesn't exist for all new Nodes and Ways before uploading 36 37 */ 37 public boolean checkUpload( Collection<OsmPrimitive> add, Collection<OsmPrimitive> update, Collection<OsmPrimitive> delete)38 public boolean checkUpload(APIDataSet apiDataSet) 38 39 { 39 if (CadastrePlugin.autoSourcing && CadastrePlugin.pluginUsed && !a dd.isEmpty()) {40 if (CadastrePlugin.autoSourcing && CadastrePlugin.pluginUsed && !apiDataSet.getPrimitivesToAdd().isEmpty()) { 40 41 Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>(); 41 for (OsmPrimitive osm : a dd) {42 for (OsmPrimitive osm : apiDataSet.getPrimitivesToAdd()) { 42 43 if ((osm instanceof Node || osm instanceof Way) 43 44 && (osm.getKeys() == null || !tagSourceExist(osm))) {
Note:
See TracChangeset
for help on using the changeset viewer.