Ticket #4085: DeleteCommandException.patch
File DeleteCommandException.patch, 1.5 KB (added by , 15 years ago) |
---|
-
src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
887 887 // Method copied from OsmPrimitive in josm-ng 888 888 // Returns only referrers that are members of the same dataset (primitive can have some fake references, for example 889 889 // when way is cloned 890 if (referrers == null)891 return Collections.emptyList();892 893 if (referrers instanceof OsmPrimitive) {894 if (((OsmPrimitive)referrers).dataSet == dataSet)895 return Collections.singletonList((OsmPrimitive)referrers);896 else897 return Collections.emptyList();898 }899 900 890 List<OsmPrimitive> result = new ArrayList<OsmPrimitive>(); 901 for (OsmPrimitive o:(OsmPrimitive[])referrers) { 902 if (dataSet == o.dataSet) { 903 result.add(o); 891 if (referrers != null) { 892 if ((referrers instanceof OsmPrimitive) && (((OsmPrimitive)referrers).dataSet == dataSet)) { 893 result.add((OsmPrimitive)referrers); 894 } else { 895 for (OsmPrimitive o:(OsmPrimitive[])referrers) { 896 if (dataSet == o.dataSet) { 897 result.add(o); 898 } 899 } 904 900 } 905 901 } 906 902