Changeset 1267 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-01-15T19:54:02+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r1263 r1267 117 117 118 118 profilerVisibleNodes++; 119 119 120 120 IconElemStyle nodeStyle = (IconElemStyle)getPrimitiveStyle(n); 121 121 122 122 if(profilerOmitDraw) 123 123 return; 124 124 125 125 if (nodeStyle != null && isZoomOk(nodeStyle)) 126 126 drawNode(n, nodeStyle.icon, nodeStyle.annotate, n.selected); … … 161 161 162 162 w.mappaintVisibleCode = 0; 163 if(fillAreas) 164 w.clearErrors(); 163 165 164 166 if(wayStyle==null) … … 185 187 profilerVisibleAreas++; 186 188 drawArea(polygon, w.selected ? selectedColor : ((AreaElemStyle)wayStyle).color); 189 if(!w.isClosed()) 190 w.putError(tr("Area style way is not closed."), true); 187 191 } 188 192 drawWay(w, ((AreaElemStyle)wayStyle).line, ((AreaElemStyle)wayStyle).color, w.selected); … … 421 425 422 426 public void visit(Relation r) { 423 427 424 428 r.mappaintVisibleCode = 0; 425 429 /* TODO implement visible handling for relations too */ … … 512 516 { 513 517 Boolean zoomok = isZoomOk(wayStyle); 518 Boolean visible = false; 514 519 Collection<Way> join = new LinkedList<Way>(); 515 520 … … 541 546 r.putError(tr("No outer way for multipolygon ''{0}''.", 542 547 r.getName()), true); 543 } 544 else if(zoomok) 548 visible = true; /* prevent killing remaining ways */ 549 } 550 else if(zoomok) 545 551 { 546 552 class PolyData { … … 638 644 for (PolyData pd : poly) 639 645 { 640 drawArea(pd.get(), (pd.way.selected || r.selected) ? selectedColor 641 : ((AreaElemStyle)wayStyle).color); 642 } 646 if(isPolygonVisible(pd.get())) 647 { 648 drawArea(pd.get(), (pd.way.selected || r.selected) ? selectedColor 649 : ((AreaElemStyle)wayStyle).color); 650 visible = true; 651 } 652 } 653 } 654 if(!visible) /* nothing visible, so disable relation and all its ways */ 655 { 656 r.mappaintVisibleCode = viewid; 657 for (Way wInner : inner) 658 wInner.mappaintVisibleCode = viewid; 659 for (Way wOuter : outer) 660 wOuter.mappaintVisibleCode = viewid; 661 return; 643 662 } 644 663 for (Way wInner : inner) … … 647 666 if(innerStyle == null) 648 667 { 649 if(zoomok) 668 if(zoomok && (wInner.mappaintDrawnCode != paintid 669 || outer.size() == 0)) 650 670 { 651 671 drawWay(wInner, ((AreaElemStyle)wayStyle).line,
Note:
See TracChangeset
for help on using the changeset viewer.