Changeset 3889 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2011-02-11T23:00:56+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
r3888 r3889 193 193 the way is tagged with a direction key 194 194 (even if the tag is negated as in oneway=false) or the way is selected */ 195 boolean showDirection = !isModifier && (selected || ((!paintSettings.isUseRealWidth()) && (paintSettings.isShowDirectionArrow() 196 && (!paintSettings.isShowRelevantDirectionsOnly() || w.hasDirectionKeys())))); 197 boolean reversedDirection = w.reversedDirection(); 195 boolean showOrientation = !isModifier && selected && !paintSettings.isUseRealWidth(); 196 boolean showOneway = !isModifier && !selected && 197 !paintSettings.isUseRealWidth() && 198 paintSettings.isShowDirectionArrow() && w.hasDirectionKeys(); 199 boolean onewayReversed = w.reversedDirection(); 198 200 /* head only takes over control if the option is true, 199 201 the direction should be shown at all and not only because it's selected */ 200 boolean showOnlyHeadArrowOnly = show Direction && !selected && paintSettings.isShowHeadArrowOnly();202 boolean showOnlyHeadArrowOnly = showOrientation && !selected && paintSettings.isShowHeadArrowOnly(); 201 203 Node lastN; 202 204 203 205 Color myDashedColor = dashesBackground; 204 206 BasicStroke myLine = line, myDashLine = dashesLine; 205 if (realWidth > 0 && paintSettings.isUseRealWidth() && !show Direction) {207 if (realWidth > 0 && paintSettings.isUseRealWidth() && !showOrientation) { 206 208 float myWidth = (int) (100 / (float) (painter.getCircum() / realWidth)); 207 209 if (myWidth < line.getLineWidth()) { … … 216 218 } 217 219 218 Color m arkColor = null;220 Color myColor = color; 219 221 if(w.isHighlighted()) { 220 m arkColor = paintSettings.getHighlightColor();222 myColor = paintSettings.getHighlightColor(); 221 223 } else if (selected) { 222 m arkColor = paintSettings.getSelectedColor(color.getAlpha());224 myColor = paintSettings.getSelectedColor(color.getAlpha()); 223 225 } else if (member) { 224 m arkColor = paintSettings.getRelationSelectedColor(color.getAlpha());226 myColor = paintSettings.getRelationSelectedColor(color.getAlpha()); 225 227 } else if(w.isDisabled()) { 226 m arkColor = paintSettings.getInactiveColor();228 myColor = paintSettings.getInactiveColor(); 227 229 myDashedColor = paintSettings.getInactiveColor(); 228 230 } 229 231 230 painter.drawWay(w, m arkColor != null ? markColor : color, myLine, myDashLine, myDashedColor, text, showDirection,231 s elected ? false : reversedDirection, showOnlyHeadArrowOnly);232 painter.drawWay(w, myColor, myLine, myDashLine, myDashedColor, text, showOrientation, 233 showOnlyHeadArrowOnly, showOneway, onewayReversed); 232 234 233 235 if(paintSettings.isShowOrderNumber()) {
Note:
See TracChangeset
for help on using the changeset viewer.