- Timestamp:
- 2009-06-27T00:28:57+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r1677 r1695 227 227 //if(!profilerOmitDraw) 228 228 //{ 229 if (fillAreas > dist && (!areaStyle.closed || w.isClosed()))229 if (fillAreas > dist) 230 230 { 231 231 // profilerVisibleAreas++; … … 460 460 AreaElemStyle areaStyle = (AreaElemStyle)style; 461 461 drawWay(way, areaStyle.line, selectedColor, true); 462 if(area && (!areaStyle.closed || way.isClosed()))462 if(area) 463 463 drawArea(way, areaselected ? selectedColor : areaStyle.color); 464 464 } … … 979 979 { 980 980 Polygon p = pd.get(); 981 if(isPolygonVisible(p) && (!areaStyle.closed || pd.isClosed()))981 if(isPolygonVisible(p)) 982 982 { 983 983 drawAreaPolygon(p, (pd.way.selected || r.selected) ? selectedColor -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r1415 r1695 11 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 12 import org.openstreetmap.josm.data.osm.OsmUtils; 13 import org.openstreetmap.josm.data.osm.Way; 13 14 import org.openstreetmap.josm.Main; 14 15 … … 54 55 return ret; 55 56 } 56 private ElemStyle get(Map<String, String> keys )57 private ElemStyle get(Map<String, String> keys, boolean noclosed) 57 58 { 58 59 AreaElemStyle retArea = null; … … 68 69 LineElemStyle styleLine; 69 70 String idx = "n" + key + "=" + val; 70 if((styleArea = areas.get(idx)) != null && (retArea == null || styleArea.priority > retArea.priority)) 71 if((styleArea = areas.get(idx)) != null && (retArea == null 72 || styleArea.priority > retArea.priority) && (!noclosed || !styleArea.closed)) 71 73 retArea = styleArea; 72 74 if((styleLine = lines.get(idx)) != null && (retLine == null || styleLine.priority > retLine.priority)) … … 78 80 over.put(idx, styleLine); 79 81 idx = "b" + key + "=" + OsmUtils.getNamedOsmBoolean(val); 80 if((styleArea = areas.get(idx)) != null && (retArea == null || styleArea.priority > retArea.priority)) 82 if((styleArea = areas.get(idx)) != null && (retArea == null 83 || styleArea.priority > retArea.priority) && (!noclosed || !styleArea.closed)) 81 84 retArea = styleArea; 82 85 if((styleLine = lines.get(idx)) != null && (retLine == null || styleLine.priority > retLine.priority)) … … 88 91 over.put(idx, styleLine); 89 92 idx = "x" + key; 90 if((styleArea = areas.get(idx)) != null && (retArea == null || styleArea.priority > retArea.priority)) 93 if((styleArea = areas.get(idx)) != null && (retArea == null 94 || styleArea.priority > retArea.priority) && (!noclosed || !styleArea.closed)) 91 95 retArea = styleArea; 92 96 if((styleLine = lines.get(idx)) != null && (retLine == null || styleLine.priority > retLine.priority)) … … 118 122 { 119 123 return (osm.keys == null) ? null : 120 ((osm instanceof Node) ? getNode(osm.keys) : get(osm.keys)); 124 ((osm instanceof Node) ? getNode(osm.keys) : get(osm.keys, 125 osm instanceof Way && !((Way)osm).isClosed())); 121 126 } 122 127 … … 130 135 if(o.keys != null && !(o instanceof Node)) 131 136 { 137 boolean noclosed = o instanceof Way && !((Way)o).isClosed(); 132 138 Iterator<String> iterator = o.keys.keySet().iterator(); 133 139 while(iterator.hasNext()) … … 135 141 String key = iterator.next(); 136 142 String val = o.keys.get(key); 137 if(areas.containsKey("n" + key + "=" + val) 138 || areas.containsKey("b" + key + "=" + OsmUtils.getNamedOsmBoolean(val)) 139 || areas.containsKey("x" + key)) 143 AreaElemStyle s = areas.get("n" + key + "=" + val); 144 if(s == null || (s.closed && noclosed)) 145 s = areas.get("b" + key + "=" + OsmUtils.getNamedOsmBoolean(val)); 146 if(s == null || (s.closed && noclosed)) 147 s = areas.get("x" + key); 148 if(s != null && !(s.closed && noclosed)) 140 149 return true; 141 150 }
Note:
See TracChangeset
for help on using the changeset viewer.