Ignore:
Timestamp:
2013-08-11T21:09:08+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8951 - fix clearing of primitive metadata

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r6090 r6140  
    200200
    201201    /**
    202      * Clears the id and version known to the OSM API. The id and the version is set to 0.
    203      * incomplete is set to false. It's preferred to use copy constructor with clearId set to true instead
     202     * Clears the metadata, including id and version known to the OSM API.
     203     * The id is a new unique id. The version, changeset and timestamp are set to 0.
     204     * incomplete and deleted are set to false. It's preferred to use copy constructor with clearMetadata set to true instead
    204205     * of calling this method.
    205      */
    206     public void clearOsmId() {
     206     * @since 6140
     207     */
     208    public void clearOsmMetadata() {
    207209        // Not part of dataset - no lock necessary
    208210        this.id = generateUniqueId();
     
    210212        this.user = null;
    211213        this.changesetId = 0; // reset changeset id on a new object
     214        this.timestamp = 0;
    212215        this.setIncomplete(false);
     216        this.setDeleted(false);
     217        this.setVisible(true);
    213218    }
    214219
Note: See TracChangeset for help on using the changeset viewer.