Changeset 1750 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-07-08T21:50:32+02:00 (17 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 4 added
- 2 edited
-
conflict (added)
-
conflict/Conflict.java (added)
-
conflict/ConflictCollection.java (added)
-
conflict/IConflictListener.java (added)
-
osm/Node.java (modified) (3 diffs)
-
osm/visitor/MergeVisitor.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r1747 r1750 5 5 6 6 import org.openstreetmap.josm.Main; 7 import org.openstreetmap.josm.data.coor.CachedLatLon; 7 8 import org.openstreetmap.josm.data.coor.EastNorth; 8 import org.openstreetmap.josm.data.coor.CachedLatLon;9 9 import org.openstreetmap.josm.data.coor.LatLon; 10 10 import org.openstreetmap.josm.data.coor.LatLon.CoordinateFormat; 11 import org.openstreetmap.josm.data.projection.Projection;12 11 import org.openstreetmap.josm.data.osm.visitor.Visitor; 13 import org.openstreetmap.josm.data.osm.Node;14 12 15 13 /** … … 25 23 if(coor != null) 26 24 { 27 if(this.coor == null) 25 if(this.coor == null) { 28 26 this.coor = new CachedLatLon(coor); 29 else27 } else { 30 28 this.coor.setCoor(coor); 29 } 31 30 } 32 31 } … … 39 38 if(eastNorth != null) 40 39 { 41 if(coor != null) 40 if(coor != null) { 42 41 coor.setEastNorth(eastNorth); 43 else42 } else { 44 43 coor = new CachedLatLon(eastNorth); 44 } 45 45 } 46 46 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
r1701 r1750 10 10 import java.util.logging.Logger; 11 11 12 import org.openstreetmap.josm.data.conflict.ConflictCollection; 12 13 import org.openstreetmap.josm.data.osm.DataSet; 13 14 import org.openstreetmap.josm.data.osm.Node; … … 31 32 * round than merged) 32 33 */ 33 private Map<OsmPrimitive, OsmPrimitive> conflicts; 34 private ConflictCollection conflicts; 35 34 36 35 37 private final DataSet myDataSet; … … 68 70 relshash.put(r.id, r); 69 71 } 70 conflicts = new HashMap<OsmPrimitive, OsmPrimitive>();72 conflicts = new ConflictCollection(); 71 73 merged = new HashMap<OsmPrimitive, OsmPrimitive>(); 72 74 } … … 113 115 // differences in deleted state have to be merged manually 114 116 // 115 conflicts. put(my, other);117 conflicts.add(my, other); 116 118 } else { 117 119 // copy the technical attributes from other … … 158 160 fixRelation(r); 159 161 } 160 for (OsmPrimitive osm : conflicts. values())162 for (OsmPrimitive osm : conflicts.getMyConflictParties()) 161 163 if (osm instanceof Way) { 162 164 fixWay((Way)osm); … … 235 237 // because it was deleted on the server. 236 238 // 237 conflicts. put(my,other);239 conflicts.add(my,other); 238 240 } else if (my.incomplete) { 239 241 // my is incomplete, other completes it … … 250 252 // differences in deleted state have to be resolved manually 251 253 // 252 conflicts. put(my,other);254 conflicts.add(my,other); 253 255 } else if (! my.modified && other.modified) { 254 256 // my not modified. We can assume that other is the most recent version. … … 278 280 // resolve the differences 279 281 // => create a conflict 280 conflicts. put(my,other);282 conflicts.add(my,other); 281 283 } else { 282 284 // clone from other, but keep the modified flag. Clone will mainly copy … … 326 328 * @return the map of conflicts 327 329 */ 328 public Map<OsmPrimitive, OsmPrimitive>getConflicts() {330 public ConflictCollection getConflicts() { 329 331 return conflicts; 330 332 }
Note:
See TracChangeset
for help on using the changeset viewer.
