Changeset 2609 in josm
- Timestamp:
- 2009-12-11T20:24:41+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r2591 r2609 145 145 if (myWay == null) 146 146 throw new RuntimeException(tr("Missing merge target for way with id {0}", other.getUniqueId())); 147 myWay.setHasIncompleteNodes();148 147 } 149 148 … … 163 162 throw new RuntimeException(tr("Missing merge target for node with id {0}", other.getUniqueId())); 164 163 if (myNode.isIncomplete() || myNode.isDeleted() || !myNode.isVisible()) return; 165 166 for (Way w: OsmPrimitive.getFilteredList(myNode.getReferrers(), Way.class)) {167 w.setHasIncompleteNodes();168 }169 164 } 170 165 -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r2591 r2609 26 26 private Node[] nodes = new Node[0]; 27 27 private BBox bbox; 28 private boolean hasIncompleteNodes;29 28 30 29 /** … … 377 376 } 378 377 379 //TODO This method should not be necessary. hasIncomplete state should be updated automatically when incomplete state of nodes change 380 public void setHasIncompleteNodes() { 381 hasIncompleteNodes = false; 378 public boolean hasIncompleteNodes() { 382 379 for (Node node:getNodes()) { 383 if (node.isIncomplete()) { 384 hasIncompleteNodes = true; 385 break; 386 } 387 } 388 } 389 390 public boolean hasIncompleteNodes() { 391 return hasIncompleteNodes; 380 if (node.isIncomplete()) 381 return true; 382 } 383 return false; 392 384 } 393 385 -
trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
r2599 r2609 193 193 } 194 194 } 195 appendGeneric(member.getMember()); 195 if (!member.getMember().isIncomplete()) { 196 appendGeneric(member.getMember()); 197 } 196 198 } 197 199 return this; … … 375 377 protected void rememberNodesOfIncompleteWaysToLoad(DataSet from) { 376 378 for (Way w: from.getWays()) { 377 if (w. isIncomplete()) {379 if (w.hasIncompleteNodes()) { 378 380 for (Node n: w.getNodes()) { 379 381 if (n.isIncomplete()) { -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r2604 r2609 482 482 } 483 483 w.setNodes(wayNodes); 484 w.setHasIncompleteNodes();485 484 if (w.hasIncompleteNodes()) { 486 485 if (logger.isLoggable(Level.FINE)) {
Note:
See TracChangeset
for help on using the changeset viewer.