Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java	(revision 3306)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java	(revision 3307)
@@ -55,5 +55,4 @@
     private double circum;
     private double dist;
-    private boolean useStyleCache;
     private static int paintid = 0;
     private EastNorth minEN;
@@ -74,41 +73,33 @@
     }
 
-    public ElemStyle getPrimitiveStyle(OsmPrimitive osm) {
-        if(!useStyleCache)
-            return ((styles != null) ? styles.get(osm) : null);
-
-        if(osm.mappaintStyle == null && styles != null) {
-            osm.mappaintStyle = styles.get(osm);
-            if(osm instanceof Way) {
-                ((Way)osm).isMappaintArea = styles.isArea(osm);
-            }
-        }
-
-        if (osm.mappaintStyle == null && osm instanceof Node) {
-            osm.mappaintStyle = SimpleNodeElemStyle.INSTANCE;
-        }
-
-        if (osm.mappaintStyle == null && osm instanceof Way) {
-            osm.mappaintStyle = LineElemStyle.UNTAGGED_WAY;
-        }
-
+    public ElemStyle getPrimitiveStyle(OsmPrimitive osm, boolean nodefault) {
+        if(osm.mappaintStyle == null)
+        {
+            if(styles != null) {
+                osm.mappaintStyle = styles.get(osm);
+                if(osm instanceof Way) {
+                    ((Way)osm).isMappaintArea = styles.isArea(osm);
+                }
+            }
+            if (osm.mappaintStyle == null) {
+                if(osm instanceof Node)
+                    osm.mappaintStyle = SimpleNodeElemStyle.INSTANCE;
+                else if (osm instanceof Way)
+                    osm.mappaintStyle = LineElemStyle.UNTAGGED_WAY;
+            }
+        }
+        if(nodefault && osm.mappaintStyle == LineElemStyle.UNTAGGED_WAY)
+            return null;
         return osm.mappaintStyle;
     }
 
     public IconElemStyle getPrimitiveNodeStyle(OsmPrimitive osm) {
-        if(!useStyleCache)
-            return (styles != null) ? styles.getIcon(osm) : null;
-
-            if(osm.mappaintStyle == null && styles != null) {
-                osm.mappaintStyle = styles.getIcon(osm);
-            }
-
-            return (IconElemStyle)osm.mappaintStyle;
+        if(osm.mappaintStyle == null && styles != null)
+            osm.mappaintStyle = styles.getIcon(osm);
+
+        return (IconElemStyle)osm.mappaintStyle;
     }
 
     public boolean isPrimitiveArea(Way osm) {
-        if(!useStyleCache)
-            return styles.isArea(osm);
-
         if(osm.mappaintStyle == null && styles != null) {
             osm.mappaintStyle = styles.get(osm);
@@ -126,5 +117,5 @@
             return;
 
-        ElemStyle nodeStyle = getPrimitiveStyle(n);
+        ElemStyle nodeStyle = getPrimitiveStyle(n, false);
 
         if (isZoomOk(nodeStyle)) {
@@ -169,5 +160,5 @@
             return;
 
-        ElemStyle wayStyle = getPrimitiveStyle(w);
+        ElemStyle wayStyle = getPrimitiveStyle(w, false);
 
         if(!isZoomOk(wayStyle))
@@ -237,5 +228,5 @@
                 if (m.isWay() && m.getMember().isDrawable())
                 {
-                    drawSelectedMember(m.getMember(), styles != null ? getPrimitiveStyle(m.getMember())
+                    drawSelectedMember(m.getMember(), styles != null ? getPrimitiveStyle(m.getMember(), false)
                             : null, true, true);
                 }
@@ -470,5 +461,5 @@
         multipolygon.load(r);
 
-        ElemStyle wayStyle = getPrimitiveStyle(r);
+        ElemStyle wayStyle = getPrimitiveStyle(r, false);
 
         // If area style was not found for relation then use style of ways
@@ -508,5 +499,5 @@
             for (Way wInner : multipolygon.getInnerWays())
             {
-                ElemStyle innerStyle = getPrimitiveStyle(wInner);
+                ElemStyle innerStyle = getPrimitiveStyle(wInner, true);
                 if(innerStyle == null)
                 {
@@ -539,5 +530,5 @@
             for (Way wOuter : multipolygon.getOuterWays())
             {
-                ElemStyle outerStyle = getPrimitiveStyle(wOuter);
+                ElemStyle outerStyle = getPrimitiveStyle(wOuter, true);
                 if(outerStyle == null)
                 {
@@ -648,5 +639,4 @@
         ++paintid;
 
-        useStyleCache = Main.pref.getBoolean("mappaint.cache", true);
         int fillAreas = Main.pref.getInteger("mappaint.fillareas", 10000000);
         LatLon ll1 = nc.getLatLon(0, 0);
@@ -734,5 +724,5 @@
                         for (RelationMember m : r.getMembers()) {
                             if (m.isNode() && m.getMember().isDrawable()) {
-                                drawSelectedMember(m.getMember(), styles != null ? getPrimitiveStyle(m.getMember()) : null, true, true);
+                                drawSelectedMember(m.getMember(), styles != null ? getPrimitiveStyle(m.getMember(), false) : null, true, true);
                             }
                         }
