- Timestamp:
- 2011-12-19T00:02:30+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r4649 r4667 280 280 private void resetNodes() { 281 281 if (!nodes.isEmpty()) { 282 DataSet ds = nodes.get(0).getDataSet(); 282 DataSet ds = null; 283 // Find DataSet (can be null for several nodes when undoing nodes creation, see #7162) 284 for (Iterator<Node> it = nodes.iterator(); it.hasNext() && ds == null; ) { 285 ds = it.next().getDataSet(); 286 } 283 287 nodes.clear(); 284 if (wayIds.size() == 1) { 288 if (ds == null) { 289 // DataSet still not found. This should not happen, but a warning does no harm 290 System.err.println("Warning: DataSet not found while resetting nodes in Multipolygon. This should not happen, you may report it to JOSM developers."); 291 } else if (wayIds.size() == 1) { 285 292 Way w = (Way) ds.getPrimitiveById(wayIds.iterator().next(), OsmPrimitiveType.WAY); 286 293 nodes.addAll(w.getNodes());
Note:
See TracChangeset
for help on using the changeset viewer.