Ticket #16390: 16390.patch

File 16390.patch, 1.1 KB (added by GerdP, 5 years ago)
  • src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java

     
    9898                            long n = hPrimitive1.getVersion();
    9999                            while (hPrimitive2 == null && idx < n) {
    100100                                hPrimitive2 = h.getByVersion(n - idx++);
     101                                if (type.equals(OsmPrimitiveType.NODE) && hPrimitive2 != null
     102                                        && ((HistoryNode) hPrimitive2).getCoords() == null) {
     103                                    // don't restore a node without coordinates
     104                                    hPrimitive2 = null;
     105                                }
    101106                            }
    102107                            if (type.equals(OsmPrimitiveType.NODE)) {
    103108                                // We get version and user from the latest version,