Changeset 7583 in josm


Ignore:
Timestamp:
2014-09-24T17:58:41+02:00 (10 years ago)
Author:
stoecker
Message:

fix #10255 - don't issue style warnings for boundaries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java

    r7573 r7583  
    207207            List<List<Node>> innerWays = joinWays(polygon.getInnerWays()); // Side effect - sets nonClosedWays
    208208            List<List<Node>> outerWays = joinWays(polygon.getOuterWays());
    209             if (styles != null) {
    210 
     209            if (styles != null && !"boundary".equals(r.get("type"))) {
    211210                AreaElemStyle area = ElemStyles.getAreaElemStyle(r, false);
    212211                boolean areaStyle = area != null;
     
    219218                        }
    220219                    }
    221                     if (!"boundary".equals(r.get("type"))) {
    222                         if (area == null) {
    223                             addError(r, new TestError(this, Severity.OTHER, tr("No area style for multipolygon"), NO_STYLE, r));
    224                         } else {
    225                             /* old style multipolygon - solve: copy tags from outer way to multipolygon */
    226                             addError(r, new TestError(this, Severity.WARNING,
    227                                     trn("Multipolygon relation should be tagged with area tags and not the outer way",
    228                                             "Multipolygon relation should be tagged with area tags and not the outer ways", polygon.getOuterWays().size()),
    229                                 NO_STYLE_POLYGON, r));
    230                         }
     220                    if (area == null) {
     221                        addError(r, new TestError(this, Severity.OTHER, tr("No area style for multipolygon"), NO_STYLE, r));
     222                    } else {
     223                        /* old style multipolygon - solve: copy tags from outer way to multipolygon */
     224                        addError(r, new TestError(this, Severity.WARNING,
     225                                trn("Multipolygon relation should be tagged with area tags and not the outer way",
     226                                        "Multipolygon relation should be tagged with area tags and not the outer ways", polygon.getOuterWays().size()),
     227                           NO_STYLE_POLYGON, r));
    231228                    }
    232229                }
Note: See TracChangeset for help on using the changeset viewer.