Changeset 11799 in josm for trunk/src


Ignore:
Timestamp:
2017-03-31T22:46:13+02:00 (7 years ago)
Author:
bastiK
Message:

fix "Area style way is not closed" validation test

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r11782 r11799  
    114114    @Override
    115115    public void visit(Way w) {
    116         if (!w.isArea() && ElemStyles.hasOnlyAreaElemStyle(w)) {
     116        if (!w.isArea() && ElemStyles.hasOnlyAreaOrTextStyleElements(w)) {
    117117            List<Node> nodes = w.getNodes();
    118118            if (nodes.isEmpty()) return; // fix zero nodes bug
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java

    r11779 r11799  
    538538     * @since 7486
    539539     */
    540     public static boolean hasOnlyAreaElemStyle(OsmPrimitive p) {
     540    public static boolean hasOnlyAreaOrTextStyleElements(OsmPrimitive p) {
    541541        MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().lock();
    542542        try {
     
    548548            }
    549549            for (StyleElement s : styles) {
    550                 if (!(s instanceof AreaElement)) {
     550                if (!(s instanceof AreaElement || s instanceof TextElement)) {
    551551                    return false;
    552552                }
Note: See TracChangeset for help on using the changeset viewer.