Changeset 2415 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-11-08T22:27:55+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2410 r2415 385 385 if (version <= 0) 386 386 throw new IllegalArgumentException(tr("Version > 0 expected. Got {0}.", version)); 387 if (dataSet != null && id != this.id) 388 throw new DataIntegrityProblemException("Id cannot be changed after primitive was added to the dataset"); 387 if (dataSet != null && id != this.id) { 388 DataSet datasetCopy = dataSet; 389 // Reindex primitive 390 datasetCopy.removePrimitive(this); 391 this.id = id; 392 datasetCopy.addPrimitive(this); 393 } 389 394 this.id = id; 390 395 this.version = version;
Note:
See TracChangeset
for help on using the changeset viewer.