Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 9341)
@@ -23,4 +23,6 @@
 
     private Map<String, Object> prop = new HashMap<>();
+
+    private boolean defaultSelectedHandling = true;
 
     private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})");
@@ -225,3 +227,11 @@
         return prop.containsKey(key);
     }
+
+    public boolean isDefaultSelectedHandling() {
+        return defaultSelectedHandling;
+    }
+
+    public void setDefaultSelectedHandling(boolean defaultSelectedHandling) {
+        this.defaultSelectedHandling = defaultSelectedHandling;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/DividedScale.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/DividedScale.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/DividedScale.java	(revision 9341)
@@ -124,7 +124,7 @@
         if (bd.get(i) == lower) {
             if (upper > bd.get(i+1))
-                throw new StyleCache.RangeViolatedError("the new range must be within a single subrange (1)");
+                throw new RangeViolatedError("the new range must be within a single subrange (1)");
             if (data.get(i) != null)
-                throw new StyleCache.RangeViolatedError("the new range must be within a subrange that has no data");
+                throw new RangeViolatedError("the new range must be within a subrange that has no data");
 
             if (bd.get(i+1) == upper) {
@@ -142,5 +142,5 @@
         } else {
             if (bd.get(i) < upper)
-                throw new StyleCache.RangeViolatedError("the new range must be within a single subrange (2)");
+                throw new RangeViolatedError("the new range must be within a single subrange (2)");
             if (data.get(i-1) != null)
                 throw new AssertionError();
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 9341)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.data.osm.visitor.paint.relations.MultipolygonCache;
 import org.openstreetmap.josm.gui.NavigatableComponent;
+import org.openstreetmap.josm.gui.mappaint.DividedScale.RangeViolatedError;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
 import org.openstreetmap.josm.gui.mappaint.styleelement.AreaElement;
@@ -97,5 +98,5 @@
             osm.mappaintStyle = StyleCache.EMPTY_STYLECACHE;
         } else {
-            Pair<StyleElementList, Range> lst = osm.mappaintStyle.getWithRange(scale);
+            Pair<StyleElementList, Range> lst = osm.mappaintStyle.getWithRange(scale, osm.isSelected());
             if (lst.a != null)
                 return lst;
@@ -146,6 +147,6 @@
         StyleCache style = osm.mappaintStyle != null ? osm.mappaintStyle : StyleCache.EMPTY_STYLECACHE;
         try {
-            osm.mappaintStyle = style.put(p.a, p.b);
-        } catch (StyleCache.RangeViolatedError e) {
+            osm.mappaintStyle = style.put(p.a, p.b, osm.isSelected());
+        } catch (RangeViolatedError e) {
             throw new AssertionError("Range violated: " + e.getMessage()
                     + " (object: " + osm.getPrimitiveId() + ", current style: "+osm.mappaintStyle
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 9341)
@@ -2,10 +2,13 @@
 package org.openstreetmap.josm.gui.mappaint;
 
+import java.util.Arrays;
+
 import org.openstreetmap.josm.data.osm.Storage;
+import org.openstreetmap.josm.tools.Pair;
 
 /**
  * Caches styles for a single primitive.
  */
-public final class StyleCache extends DividedScale<StyleElementList> {
+public final class StyleCache {
 
     // TODO: clean up the intern pool from time to time (after purge or layer removal)
@@ -14,28 +17,59 @@
     public static final StyleCache EMPTY_STYLECACHE = (new StyleCache()).intern();
 
+    private static final int PLAIN = 0;
+    private static final int SELECTED = 1;
+
+    @SuppressWarnings("unchecked")
+    private final DividedScale<StyleElementList>[] states = (DividedScale<StyleElementList>[]) new DividedScale[2];
+
     private StyleCache(StyleCache sc) {
-        super(sc);
+        states[0] = sc.states[0];
+        states[1] = sc.states[1];
     }
 
     private StyleCache() {
-        super();
     }
 
-    /**
-     * Add data object which is valid for the given range.
-     *
-     * This is only possible, if there is no data for the given range yet.
-     *
-     * @param o data object
-     * @param r the valid range
-     * @return a new, updated, <code>DividedScale</code> object
-     */
-    @Override
-    public StyleCache put(StyleElementList o, Range r) {
+    public StyleCache put(StyleElementList o, Range r, boolean selected) {
         StyleCache s = new StyleCache(this);
-        s.putImpl(o, r.getLower(), r.getUpper());
-        s.consistencyTest();
+
+        int idx = getIndex(selected);
+        DividedScale<StyleElementList> ds = s.states[idx];
+        if (ds == null) {
+            ds = s.states[idx] = new DividedScale<>();
+        }
+        ds.putImpl(o, r.getLower(), r.getUpper());
+        ds.consistencyTest();
         s.intern();
         return s;
+    }
+
+    public Pair<StyleElementList, Range> getWithRange(double scale, boolean selected) {
+        int idx = getIndex(selected);
+        if (states[idx] == null) {
+            return Pair.create(null, Range.ZERO_TO_INFINITY);
+        }
+        return states[idx].getWithRange(scale);
+    }
+
+    private int getIndex(boolean selected) {
+        return selected ? SELECTED : PLAIN;
+    }
+
+    @Override
+    public int hashCode() {
+        return Arrays.deepHashCode(this.states);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final StyleCache other = (StyleCache) obj;
+        return Arrays.deepEquals(this.states, other.states);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleKeys.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleKeys.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleKeys.java	(revision 9341)
@@ -54,4 +54,5 @@
     String TEXT_OPACITY = "text-opacity";
     String TEXT_POSITION = "text-position";
+    String WAY_DIRECTION_ARROWS = "way-direction-arrows";
     String WIDTH = "width";
     String Z_INDEX = "z-index";
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 9341)
@@ -649,4 +649,10 @@
             return false;
         }
+
+        static boolean selected(Environment e) {
+            Cascade c = e.mc.getCascade(e.layer);
+            c.setDefaultSelectedHandling(false);
+            return e.osm.isSelected();
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java	(revision 9341)
@@ -138,5 +138,5 @@
     @Override
     public int hashCode() {
-        int hash = 3;
+        int hash = super.hashCode();
         hash = 61 * hash + color.hashCode();
         hash = 61 * hash + (extent != null ? Float.floatToIntBits(extent) : 0);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java	(revision 9341)
@@ -32,5 +32,6 @@
             c.put(Z_INDEX, -3f);
         }
-        return createLine(new Environment(null, mc, "default", null));
+        Way w = new Way();
+        return createLine(new Environment(w, mc, "default", null));
     }
 
@@ -42,4 +43,5 @@
     public float offset;
     public float realWidth; // the real width of this line in meter
+    public boolean wayDirectionArrows;
 
     private BasicStroke dashesLine;
@@ -61,5 +63,5 @@
 
     protected LineElement(Cascade c, float default_major_z_index, BasicStroke line, Color color, BasicStroke dashesLine,
-            Color dashesBackground, float offset, float realWidth) {
+            Color dashesBackground, float offset, float realWidth, boolean wayDirectionArrows) {
         super(c, default_major_z_index);
         this.line = line;
@@ -69,4 +71,5 @@
         this.offset = offset;
         this.realWidth = realWidth;
+        this.wayDirectionArrows = wayDirectionArrows;
     }
 
@@ -264,5 +267,8 @@
         }
 
-        return new LineElement(c, type.defaultMajorZIndex, line, color, dashesLine, dashesBackground, offset, realWidth);
+        boolean wayDirectionArrows = c.get(type.prefix + WAY_DIRECTION_ARROWS, env.osm.isSelected(), Boolean.class);
+
+        return new LineElement(c, type.defaultMajorZIndex, line, color, dashesLine, dashesBackground,
+                offset, realWidth, wayDirectionArrows);
     }
 
@@ -274,5 +280,10 @@
         the way is tagged with a direction key
         (even if the tag is negated as in oneway=false) or the way is selected */
-        boolean showOrientation = !isModifier && (selected || paintSettings.isShowDirectionArrow()) && !paintSettings.isUseRealWidth();
+        boolean showOrientation;
+        if (defaultSelectedHandling) {
+            showOrientation = !isModifier && (selected || paintSettings.isShowDirectionArrow()) && !paintSettings.isUseRealWidth();
+        } else {
+            showOrientation = wayDirectionArrows;
+        }
         boolean showOneway = !isModifier && !selected &&
                 !paintSettings.isUseRealWidth() &&
@@ -300,5 +311,5 @@
 
         Color myColor = color;
-        if (selected) {
+        if (defaultSelectedHandling && selected) {
             myColor = paintSettings.getSelectedColor(color.getAlpha());
         } else if (member || outermember) {
@@ -342,5 +353,6 @@
             Objects.equals(dashesBackground, other.dashesBackground) &&
             offset == other.offset &&
-            realWidth == other.realWidth;
+            realWidth == other.realWidth &&
+            wayDirectionArrows == other.wayDirectionArrows;
     }
 
@@ -354,4 +366,5 @@
         hash = 29 * hash + Float.floatToIntBits(offset);
         hash = 29 * hash + Float.floatToIntBits(realWidth);
+        hash = 29 * hash + (this.wayDirectionArrows ? 1 : 0);
         return hash;
     }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineTextElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineTextElement.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineTextElement.java	(revision 9341)
@@ -54,5 +54,7 @@
     @Override
     public int hashCode() {
-        return text.hashCode();
+        int hash = super.hashCode();
+        hash = 43 * hash + text.hashCode();
+        return hash;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java	(revision 9341)
@@ -285,5 +285,5 @@
                     if (painter.isInactiveMode() || n.isDisabled()) {
                         fillColor = settings.getInactiveColor();
-                    } else if (selected) {
+                    } else if (defaultSelectedHandling && selected) {
                         fillColor = settings.getSelectedColor(fillColor.getAlpha());
                     } else if (member) {
@@ -295,5 +295,5 @@
                     if (painter.isInactiveMode() || n.isDisabled()) {
                         strokeColor = settings.getInactiveColor();
-                    } else if (selected) {
+                    } else if (defaultSelectedHandling && selected) {
                         strokeColor = settings.getSelectedColor(strokeColor.getAlpha());
                     } else if (member) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java	(revision 9341)
@@ -81,5 +81,5 @@
     @Override
     public int hashCode() {
-        int hash = 7;
+        int hash = super.hashCode();
         hash = 83 * hash + this.pattern.hashCode();
         hash = 83 * hash + Float.floatToIntBits(this.offset);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java	(revision 9338)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java	(revision 9341)
@@ -32,10 +32,12 @@
     public boolean isModifier;  // false, if style can serve as main style for the
     // primitive; true, if it is a highlight or modifier
-
-    public StyleElement(float major_z_index, float z_index, float object_z_index, boolean isModifier) {
+    public boolean defaultSelectedHandling;
+
+    public StyleElement(float major_z_index, float z_index, float object_z_index, boolean isModifier, boolean defaultSelectedHandling) {
         this.majorZIndex = major_z_index;
         this.zIndex = z_index;
         this.objectZIndex = object_z_index;
         this.isModifier = isModifier;
+        this.defaultSelectedHandling = defaultSelectedHandling;
     }
 
@@ -45,4 +47,5 @@
         objectZIndex = c.get(OBJECT_Z_INDEX, 0f, Float.class);
         isModifier = c.get(MODIFIER, Boolean.FALSE, Boolean.class);
+        defaultSelectedHandling = c.isDefaultSelectedHandling();
     }
 
