Changeset 17096 in josm for trunk/src


Ignore:
Timestamp:
2020-10-07T19:45:21+02:00 (4 years ago)
Author:
GerdP
Message:

fix #19581: Fixing duplicated nodes does not work

  • also check if there is a download area, if not, don't offer auto fix
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r16555 r17096  
    334334        if (testError.getCode() == DUPLICATE_NODE) return false;
    335335        // cannot merge nodes outside download area
    336         final Iterator<? extends OsmPrimitive> it = testError.getPrimitives().iterator();
    337         return it.hasNext() && !it.next().isOutsideDownloadArea();
     336        return testError.getPrimitives().stream().filter(p -> !p.isDeleted()).count() > 1
     337                && Command.checkOutlyingOrIncompleteOperation(testError.getPrimitives(), null) == Command.IS_OK;
    338338        // everything else is ok to merge
    339339    }
Note: See TracChangeset for help on using the changeset viewer.