Changeset 9574 in josm for trunk/src/org
- Timestamp:
- 2016-01-23T03:47:29+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r9490 r9574 185 185 return r.types.contains(TaggingPresetType.WAY); 186 186 case MULTIPOLYGON: 187 return r.types.contains(TaggingPresetType.MULTIPOLYGON); 187 188 case RELATION: 188 189 return r.types.contains(TaggingPresetType.RELATION); -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java
r8863 r9574 88 88 try { 89 89 TaggingPresetType presetType = TaggingPresetType.fromString(type); 90 result.add(presetType); 90 if (presetType != null) { 91 result.add(presetType); 92 } 91 93 } catch (IllegalArgumentException e) { 92 94 throw new SAXException(tr("Unknown type: {0}", type), e); -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetType.java
r8863 r9574 17 17 RELATION(/* ICON */ "Mf_relation", "relation"), 18 18 /** Closed way */ 19 CLOSEDWAY(/* ICON */ "Mf_closedway", "closedway"); 19 CLOSEDWAY(/* ICON */ "Mf_closedway", "closedway"), 20 /** Multipolygon */ 21 MULTIPOLYGON(/* ICON */ "multipoly_create", "multipolygon"); // FIXME find a better multipolygon icon 20 22 private final String iconName; 21 23 private final String name; … … 57 59 */ 58 60 public static TaggingPresetType forPrimitiveType(OsmPrimitiveType type) { 59 if (type == OsmPrimitiveType.NODE) return NODE; 60 if (type == OsmPrimitiveType.WAY) return WAY; 61 if (type == OsmPrimitiveType.CLOSEDWAY) return CLOSEDWAY; 62 if (type == OsmPrimitiveType.RELATION || type == OsmPrimitiveType.MULTIPOLYGON) 63 return RELATION; 61 if (type == OsmPrimitiveType.NODE) 62 return NODE; 63 if (type == OsmPrimitiveType.WAY) 64 return WAY; 65 if (type == OsmPrimitiveType.CLOSEDWAY) 66 return CLOSEDWAY; 67 if (type == OsmPrimitiveType.MULTIPOLYGON) 68 return TaggingPresetType.MULTIPOLYGON; 69 if (type == OsmPrimitiveType.RELATION) 70 return RELATION; 64 71 throw new IllegalArgumentException("Unexpected primitive type: " + type); 65 72 }
Note:
See TracChangeset
for help on using the changeset viewer.