Changeset 3841 in josm


Ignore:
Timestamp:
2011-02-01T19:50:51+01:00 (13 years ago)
Author:
jttt
Message:

Fixed #5895 JOSM 3838 latest didn't work

File:
1 edited

Legend:

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

    r3836 r3841  
    6868    private static final double sinPHI = Math.sin(PHI);
    6969
    70     public MapPainter(MapPaintSettings settings, Graphics2D g, 
    71         boolean inactive, NavigatableComponent nc, boolean virtual,
    72         double circum, boolean leftHandTraffic)
     70    public MapPainter(MapPaintSettings settings, Graphics2D g,
     71            boolean inactive, NavigatableComponent nc, boolean virtual,
     72            double circum, boolean leftHandTraffic)
    7373    {
    7474        this.g = g;
     
    162162        g.setColor(inactive ? inactiveColor : color);
    163163        if (useStrokes) {
    164             if (dashed == null || dashed.length > 0) {
     164            if (dashed != null && dashed.length > 0) {
    165165                g.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0, dashed,0));
    166166            } else {
     
    173173        if(!inactive && useStrokes && dashedColor != null) {
    174174            g.setColor(dashedColor);
    175             if (dashed == null || dashed.length > 0) {
     175            if (dashed != null && dashed.length > 0) {
    176176                float[] dashedOffset = new float[dashed.length];
    177177                System.arraycopy(dashed, 1, dashedOffset, 0, dashed.length - 1);
     
    285285            g.fillPolygon(polygon);
    286286        }
    287            
     287
    288288
    289289        if (name != null) {
     
    384384
    385385                    if("from".equals(m.getRole())) {
    386                         if(fromWay == null)
     386                        if(fromWay == null) {
    387387                            fromWay = w;
     388                        }
    388389                    } else if("to".equals(m.getRole())) {
    389                         if(toWay == null)
     390                        if(toWay == null) {
    390391                            toWay = w;
     392                        }
    391393                    } else if("via".equals(m.getRole())) {
    392                         if(via == null)
     394                        if(via == null) {
    393395                            via = w;
     396                        }
    394397                    }
    395398                }
     
    397400                {
    398401                    Node n = m.getNode();
    399                     if("via".equals(m.getRole()) && via == null)
     402                    if("via".equals(m.getRole()) && via == null) {
    400403                        via = n;
     404                    }
    401405                }
    402406            }
     
    410414        {
    411415            viaNode = (Node) via;
    412             if(!fromWay.isFirstLastNode(viaNode)) {
     416            if(!fromWay.isFirstLastNode(viaNode))
    413417                return;
    414             }
    415418        }
    416419        else
     
    441444            } else if (!onewayvia && fromWay.isFirstLastNode(lastNode)) {
    442445                viaNode = lastNode;
    443             } else {
     446            } else
    444447                return;
    445             }
    446448        }
    447449
Note: See TracChangeset for help on using the changeset viewer.