Changeset 4387 in josm for trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
- Timestamp:
- 2011-08-31T17:15:24+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r3995 r4387 109 109 protected Map<OsmPrimitiveType, Integer> getSourceStatistics() { 110 110 HashMap<OsmPrimitiveType, Integer> ret = new HashMap<OsmPrimitiveType, Integer>(); 111 for (OsmPrimitiveType type: OsmPrimitiveType. values()) {111 for (OsmPrimitiveType type: OsmPrimitiveType.dataValues()) { 112 112 if (!getSourceTagsByType(type).isEmpty()) { 113 113 ret.put(type, getSourcePrimitivesByType(type).size()); … … 119 119 protected Map<OsmPrimitiveType, Integer> getTargetStatistics() { 120 120 HashMap<OsmPrimitiveType, Integer> ret = new HashMap<OsmPrimitiveType, Integer>(); 121 for (OsmPrimitiveType type: OsmPrimitiveType. values()) {121 for (OsmPrimitiveType type: OsmPrimitiveType.dataValues()) { 122 122 int count = OsmPrimitive.getFilteredList(target, type.getOsmClass()).size(); 123 123 if (count > 0) { … … 139 139 protected void pasteFromHomogeneousSource() { 140 140 TagCollection tc = null; 141 for (OsmPrimitiveType type : OsmPrimitiveType. values()) {141 for (OsmPrimitiveType type : OsmPrimitiveType.dataValues()) { 142 142 TagCollection tc1 = getSourceTagsByType(type); 143 143 if (!tc1.isEmpty()) { … … 185 185 */ 186 186 protected boolean canPasteFromHeterogeneousSourceWithoutConflict(Collection<OsmPrimitive> targets) { 187 for (OsmPrimitiveType type :OsmPrimitiveType.values()) {187 for (OsmPrimitiveType type : OsmPrimitiveType.dataValues()) { 188 188 if (hasTargetPrimitives(type.getOsmClass())) { 189 189 TagCollection tc = TagCollection.unionOfAllPrimitives(getSourcePrimitivesByType(type)); … … 203 203 protected void pasteFromHeterogeneousSource() { 204 204 if (canPasteFromHeterogeneousSourceWithoutConflict(target)) { 205 for (OsmPrimitiveType type :OsmPrimitiveType.values()) {205 for (OsmPrimitiveType type : OsmPrimitiveType.dataValues()) { 206 206 if (hasSourceTagsByType(type) && hasTargetPrimitives(type.getOsmClass())) { 207 207 buildChangeCommand(target, getSourceTagsByType(type)); … … 220 220 if (dialog.isCanceled()) 221 221 return; 222 for (OsmPrimitiveType type :OsmPrimitiveType.values()) {222 for (OsmPrimitiveType type : OsmPrimitiveType.dataValues()) { 223 223 if (hasSourceTagsByType(type) && hasTargetPrimitives(type.getOsmClass())) { 224 224 buildChangeCommand(OsmPrimitive.getFilteredList(target, type.getOsmClass()), dialog.getResolution(type));
Note:
See TracChangeset
for help on using the changeset viewer.