Changeset 34999 in osm for applications/editors


Ignore:
Timestamp:
2019-05-16T07:49:43+02:00 (6 years ago)
Author:
gerdp
Message:

fix #17720: partial changeset revert do a revert for the whole changeset
regression of r34958 : accidential remove of method call checkOsmChangeEntry(entry))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java

    r34961 r34999  
    161161        for (PrimitiveId id : cds.getIds()) {
    162162            ChangesetDataSetEntry first = cds.getFirstEntry(id);
    163             ChangesetDataSetEntry last = cds.getLastEntry(id);
    164163            earliestVersions.put(id, (int) first.getPrimitive().getVersion());
    165             if (first.getModificationType() == ChangesetModificationType.CREATED)
    166                 created.add(first.getPrimitive());
    167             else if (last.getModificationType() == ChangesetModificationType.UPDATED)
    168                 updated.add(last.getPrimitive());
    169             else if (last.getModificationType() == ChangesetModificationType.DELETED)
    170                 deleted.add(last.getPrimitive());
     164            ChangesetDataSetEntry entry = first.getModificationType() == ChangesetModificationType.CREATED ? first
     165                    : cds.getLastEntry(id);
     166            if (checkOsmChangeEntry(entry)) {
     167                if (entry.getModificationType() == ChangesetModificationType.CREATED) {
     168                    created.add(entry.getPrimitive());
     169                } else if (entry.getModificationType() == ChangesetModificationType.UPDATED) {
     170                    updated.add(entry.getPrimitive());
     171                } else if (entry.getModificationType() == ChangesetModificationType.DELETED) {
     172                    deleted.add(entry.getPrimitive());
     173                }
     174            }
    171175        }
    172176    }
Note: See TracChangeset for help on using the changeset viewer.