Ticket #2281: JOSM.patch

File JOSM.patch, 1.8 KB (added by landwirt@…, 3 years ago)
  • src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java

     
    188188                    putError(w, tr("Area style way is not closed."), true); 
    189189                } 
    190190            } 
    191             areaStyle.getLineStyle().paintPrimitive(w, paintSettings, painter, data.isSelected(w)); 
     191 
     192            LineElemStyle lineStyle = new LineElemStyle((LineElemStyle) areaStyle.getLineStyle()); 
     193 
     194            // inherit color if no line color is set 
     195            if (lineStyle.color == null) { 
     196                lineStyle.color = areaStyle.color; 
     197            } 
     198 
     199            lineStyle.paintPrimitive(w, paintSettings, painter, data.isSelected(w)); 
    192200        } 
    193201    } 
    194202 
  • src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

     
    6868        } 
    6969    } 
    7070 
     71    public LineElemStyle(LineElemStyle s) { 
     72        this.width = s.width; 
     73        this.realWidth = s.realWidth; 
     74        this.color = s.color; 
     75        this.dashed = s.dashed; 
     76        this.dashedColor = s.dashedColor; 
     77        this.over = s.over; 
     78        this.widthMode = s.widthMode; 
     79 
     80        this.priority = s.priority; 
     81        this.maxScale = s.maxScale; 
     82        this.minScale = s.minScale; 
     83        this.rules = s.rules; 
     84 
     85        this.code = s.code; 
     86    } 
     87 
    7188    public LineElemStyle() { init(); } 
    7289 
    7390    public void init()