Changeset 3844 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint
- Timestamp:
- 2011-02-02T16:56:07+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r3843 r3844 103 103 for (OsmPrimitive referrer : osm.getReferrers()) { 104 104 Relation r = (Relation) referrer; 105 if (!drawMultipolygon || ! "multipolygon".equals(r.get("type")) || !r.isUsable()) {105 if (!drawMultipolygon || !r.isMultipolygon() || !r.isUsable()) { 106 106 continue; 107 107 } … … 150 150 for (OsmPrimitive referrer : osm.getReferrers()) { 151 151 Relation ref = (Relation) referrer; 152 if (!drawMultipolygon || ! "multipolygon".equals(ref.get("type"))|| !ref.isUsable()) {152 if (!drawMultipolygon || !ref.isMultipolygon() || !ref.isUsable()) { 153 153 continue; 154 154 } … … 184 184 { 185 185 Pair<StyleList, Range> p = generateStyles(osm, scale, null, true); 186 if (drawMultipolygon && "multipolygon".equals(osm.get("type"))) {186 if (drawMultipolygon && ((Relation)osm).isMultipolygon()) { 187 187 if (!Utils.exists(p.a, AreaElemStyle.class)) { 188 188 // look at outer ways to find area style … … 235 235 addIfNotNull(sl, NodeElemStyle.create(c)); 236 236 } else if (osm instanceof Relation) { 237 if ( "multipolygon".equals(osm.get("type"))) {237 if (((Relation)osm).isMultipolygon()) { 238 238 addIfNotNull(sl, AreaElemStyle.create(c)); 239 239 addIfNotNull(sl, LineElemStyle.createLine(c)); -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r3843 r3844 67 67 while(parser.hasNext()) { 68 68 } 69 69 70 70 } catch(IOException e) { 71 71 System.err.println(tr("Warning: failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString())); … … 278 278 } 279 279 } 280 } else if (osm instanceof Way || (osm instanceof Relation && "multipolygon".equals(osm.get("type")))) {280 } else if (osm instanceof Way || (osm instanceof Relation && ((Relation)osm).isMultipolygon())) { 281 281 WayPrototypesRecord p = new WayPrototypesRecord(); 282 282 get(osm, pretendWayIsClosed || !(osm instanceof Way) || ((Way) osm).isClosed(), p, (useMinMaxScale ? scale : null), mc);
Note:
See TracChangeset
for help on using the changeset viewer.