- Timestamp:
- 2012-11-04T00:57:22+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
r5354 r5561 14 14 import org.openstreetmap.josm.data.osm.PrimitiveId; 15 15 import org.openstreetmap.josm.data.osm.SimplePrimitiveId; 16 import org.openstreetmap.josm.tools.Utils;17 16 18 17 /** … … 104 103 } catch (IllegalArgumentException ex) { 105 104 try { 106 if (type == OsmPrimitiveType.NODE) { 107 ids.add(new SimplePrimitiveId(Long.parseLong(s), OsmPrimitiveType.NODE)); 105 long id = Long.parseLong(s); 106 if (id <= 0) { 107 return false; 108 } else if (type == OsmPrimitiveType.NODE) { 109 ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.NODE)); 108 110 } else if (type == OsmPrimitiveType.WAY) { 109 ids.add(new SimplePrimitiveId( Long.parseLong(s), OsmPrimitiveType.WAY));111 ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.WAY)); 110 112 } else if (type == OsmPrimitiveType.RELATION) { 111 ids.add(new SimplePrimitiveId( Long.parseLong(s), OsmPrimitiveType.RELATION));113 ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.RELATION)); 112 114 } else { 113 115 return false;
Note:
See TracChangeset
for help on using the changeset viewer.