Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java	(revision 2667)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java	(revision 2668)
@@ -250,8 +250,4 @@
         }
         if (realWidth > 0 && useRealWidth && !showDirection) {
-            int tmpWidth = (int) (100 /  (float) (circum / realWidth));
-            if (tmpWidth > width) {
-                width = tmpWidth;
-            }
 
             /* if we have a "width" tag, try use it */
@@ -263,8 +259,13 @@
             if(widthTag != null) {
                 try {
-                    width = Integer.parseInt(widthTag);
+                    realWidth = Integer.parseInt(widthTag);
                 }
                 catch(NumberFormatException nfe) {
                 }
+            }
+
+            int tmpWidth = (int) (100 /  (float) (circum / realWidth));
+            if (tmpWidth > width) {
+                width = tmpWidth;
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 2667)
+++ trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 2668)
@@ -582,5 +582,5 @@
 
     private void setEditLayer() {
-        OsmDataLayer newEditLayer = null;
+        OsmDataLayer newEditLayer = editLayer;
         OsmDataLayer oldEditLayer = editLayer;
 
