Changeset 3329 in josm


Ignore:
Timestamp:
2010-06-10T09:53:42+02:00 (14 years ago)
Author:
stoecker
Message:

improve painting of disabled multipolygons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java

    r3322 r3329  
    373373        ElemStyle wayStyle = getPrimitiveStyle(r, false);
    374374
     375        boolean disabled = r.isDisabled();
    375376        // If area style was not found for relation then use style of ways
    376377        if(styles != null && !(wayStyle instanceof AreaElemStyle)) {
    377378            for (Way w : multipolygon.getOuterWays()) {
    378379                wayStyle = styles.getArea(w);
     380                disabled = disabled || w.isDisabled();
    379381                if(wayStyle != null) {
    380382                    break;
    381383                }
    382384            }
    383             r.mappaintStyle = wayStyle;
    384385        }
    385386
     
    390391            drawn = true;
    391392
    392             if(zoomok && !multipolygon.getOuterWays().isEmpty()) {
     393            if(zoomok && !disabled && !multipolygon.getOuterWays().isEmpty()) {
    393394                AreaElemStyle areaStyle = (AreaElemStyle)wayStyle;
    394395                for (PolyData pd : multipolygon.getCombinedPolygons()) {
     
    410411                ElemStyle innerStyle = getPrimitiveStyle(wInner, true);
    411412                if(innerStyle == null) {
    412                     if (data.isSelected(wInner))
     413                    if (data.isSelected(wInner) || disabled)
    413414                        continue;
    414415                    if(zoomok && (wInner.mappaintDrawnCode != paintid || multipolygon.getOuterWays().isEmpty())) {
Note: See TracChangeset for help on using the changeset viewer.