- Timestamp:
- 2009-12-28T14:22:30+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2675 r2696 486 486 this.id = generateUniqueId(); 487 487 this.version = 0; 488 this.changesetId = 0; // reset changeset id on a new object 488 489 this.setIncomplete(false); 489 490 } … … 1003 1004 setKeys(other.getKeys()); 1004 1005 id = other.id; 1006 if (id <=0) { 1007 // reset version and changeset id 1008 version = 0; 1009 changesetId = 0; 1010 } 1005 1011 timestamp = other.timestamp; 1006 version = other.version; 1012 if (id > 0) { 1013 version = other.version; 1014 } 1007 1015 setIncomplete(other.isIncomplete()); 1008 1016 flags = other.flags; 1009 1017 user= other.user; 1010 setChangesetId(other.changesetId); 1018 if (id > 0 && other.changesetId > 0) { 1019 // #4208: sometimes we cloned from other with id < 0 *and* 1020 // an assigned changeset id. Don't know why yet. For primitives 1021 // with id < 0 we don't propagate the changeset id any more. 1022 // 1023 setChangesetId(other.changesetId); 1024 } 1011 1025 clearCached(); 1012 1026 } … … 1030 1044 if (! other.isNew() && other.getId() != id) 1031 1045 throw new DataIntegrityProblemException(tr("Can''t merge primitives with different ids. This id is {0}, the other is {1}", id, other.getId())); 1046 1032 1047 setKeys(other.getKeys()); 1033 1048 timestamp = other.timestamp; … … 1036 1051 flags = other.flags; 1037 1052 user= other.user; 1038 setChangesetId(other.changesetId);1053 changesetId = other.changesetId; 1039 1054 } 1040 1055
Note:
See TracChangeset
for help on using the changeset viewer.