Changeset 3257 in josm for trunk/src/org
- Timestamp:
- 2010-05-16T10:55:58+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
r3083 r3257 12 12 import javax.swing.tree.MutableTreeNode; 13 13 14 import org.openstreetmap.josm.data.osm.Node; 14 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 16 import org.openstreetmap.josm.data.osm.PrimitiveData; … … 31 32 } 32 33 34 // Load nodes first to prevent ways with null coordinates 33 35 for (int i=0; i<createdPrimitives.size(); i++) { 34 createdPrimitives.get(i).load(data.get(i)); 36 if (createdPrimitives.get(i) instanceof Node) { 37 createdPrimitives.get(i).load(data.get(i)); 38 } 35 39 } 40 41 // Now load ways and relations 42 for (int i=0; i<createdPrimitives.size(); i++) { 43 if (!(createdPrimitives.get(i) instanceof Node)) { 44 createdPrimitives.get(i).load(data.get(i)); 45 } 46 } 47 36 48 getLayer().data.setSelected(createdPrimitives); 37 49 return true;
Note:
See TracChangeset
for help on using the changeset viewer.