Ignore:
Timestamp:
2011-03-18T00:22:13+01:00 (13 years ago)
Author:
mjulius
Message:

fix #6113 - removing "mandatory" arrows on some types of ways
Since oneway arrows are now different from way direction arrows they need to be treated separately.
They now can be turned on and off independently.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

    r3992 r3994  
    121121                }
    122122            }
    123             if (!hasPositive || dashes.length == 0) {
     123            if (!hasPositive || (dashes != null && dashes.length == 0)) {
    124124                dashes = null;
    125125            }
     
    198198        the way is tagged with a direction key
    199199        (even if the tag is negated as in oneway=false) or the way is selected */
    200         boolean showOrientation = !isModifier && selected && !paintSettings.isUseRealWidth();
     200        boolean showOrientation = !isModifier && (selected || paintSettings.isShowDirectionArrow()) && !paintSettings.isUseRealWidth();
    201201        boolean showOneway = !isModifier && !selected &&
    202                 !paintSettings.isUseRealWidth() &&
    203                 paintSettings.isShowDirectionArrow() && w.hasDirectionKeys();
     202        !paintSettings.isUseRealWidth() &&
     203        paintSettings.isShowOnewayArrow() && w.hasDirectionKeys();
    204204        boolean onewayReversed = w.reversedDirection();
    205205        /* head only takes over control if the option is true,
     
    215215                myWidth = line.getLineWidth();
    216216            }
    217             myLine = new BasicStroke(myWidth, line.getEndCap(), line.getLineJoin(), 
     217            myLine = new BasicStroke(myWidth, line.getEndCap(), line.getLineJoin(),
    218218                    line.getMiterLimit(), line.getDashArray(), line.getDashPhase());
    219219            if (dashesLine != null) {
     
    259259        final LineElemStyle other = (LineElemStyle) obj;
    260260        return  equal(line, other.line) &&
    261                 equal(color, other.color) &&
    262                 equal(dashesLine, other.dashesLine) &&
    263                 equal(dashesBackground, other.dashesBackground) &&
    264                 equal(text, other.text) &&
    265                 realWidth == other.realWidth;
     261        equal(color, other.color) &&
     262        equal(dashesLine, other.dashesLine) &&
     263        equal(dashesBackground, other.dashesBackground) &&
     264        equal(text, other.text) &&
     265        realWidth == other.realWidth;
    266266    }
    267267
     
    281281    public String toString() {
    282282        return "LineElemStyle{" + super.toString() + "width=" + line.getLineWidth() +
    283                 " realWidth=" + realWidth + " color=" + Utils.toString(color) +
    284                 " dashed=" + Arrays.toString(line.getDashArray()) +
    285                 (line.getDashPhase() == 0f ? "" : " dashesOffses=" + line.getDashPhase()) +
    286                 " dashedColor=" + Utils.toString(dashesBackground) + '}';
     283        " realWidth=" + realWidth + " color=" + Utils.toString(color) +
     284        " dashed=" + Arrays.toString(line.getDashArray()) +
     285        (line.getDashPhase() == 0f ? "" : " dashesOffses=" + line.getDashPhase()) +
     286        " dashedColor=" + Utils.toString(dashesBackground) + '}';
    287287    }
    288288}
Note: See TracChangeset for help on using the changeset viewer.