Changeset 17752 in josm for trunk/src/org/openstreetmap/josm/data/osm/Relation.java
- Timestamp:
- 2021-04-12T00:16:06+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r17357 r17752 441 441 @Override 442 442 public BBox getBBox() { 443 if (getDataSet() != null && bbox != null) 444 return new BBox(bbox); // use cached value 443 if (getDataSet() != null && bbox != null) { 444 return this.bbox; // use cached immutable value 445 } 445 446 446 447 BBox box = new BBox(); 447 448 addToBBox(box, new HashSet<PrimitiveId>()); 448 if (getDataSet() != null) 449 setBBox(box); // set cache 450 return new BBox(box); 449 if (getDataSet() == null) { 450 return box; 451 } 452 setBBox(box); // set cached immutable value 453 return this.bbox; 451 454 } 452 455 453 456 private void setBBox(BBox bbox) { 454 this.bbox = bbox; 457 this.bbox = bbox == null ? null : bbox.toImmutable(); 455 458 } 456 459
Note:
See TracChangeset
for help on using the changeset viewer.