Index: applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
===================================================================
--- applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java	(revision 4844)
+++ applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java	(revision 4847)
@@ -17,5 +17,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.Segment;
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -56,5 +55,5 @@
 		}
 		
-		// formular to calculate a map scale: natural size / map size = scale
+		// formula to calculate a map scale: natural size / map size = scale
 		// example: 876000mm (876m as displayed) / 22mm (roughly estimated screen size of legend bar) = 39818
 		//
@@ -95,16 +94,4 @@
 
 	/**
-	 * Draw just a line between the points.
-	 * White if selected (as always) or grey otherwise.
-	 * Want to make un-wayed segments stand out less than ways.
-	 */
-	@Override public void visit(Segment ls) {
-		ElemStyle segmentStyle = MapPaintPlugin.elemStyles.getStyle(ls);
-		if(isZoomOk(segmentStyle)) {
-			drawSegment(ls, untaggedColor, showDirectionArrow);
-		}
-	}
-
-	/**
 	 * Draw a line for all segments, according to tags.
 	 * @param w The way to draw.
@@ -145,29 +132,32 @@
 			drawWayAsArea(w, colour);
 		int orderNumber = 0;
-		for (Segment ls : w.segments)
-		{
+		
+		Node lastN = null;
+		for (Node n : w.nodes) {
+			if (lastN == null) {
+				lastN = n;
+				continue;
+			}
 			orderNumber++;
-				if (area && fillAreas)
-					//Draw segments in a different colour so direction arrows show against the fill
-					drawSegment(ls, w.selected ? selectedColor : untaggedColor, showDirection, width,true);
+	//		drawSegment(lastN, n, w.selected && !inactive ? selectedColor : wayColor, showDirectionArrow);
+
+			if (area && fillAreas)
+				//Draw segments in a different colour so direction arrows show against the fill
+				drawSeg(lastN, n, w.selected ? selectedColor : untaggedColor, showDirection, width, true);
+			else
+				if (area)
+					drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, true);
 				else
-					if (area)
-						drawSegment(ls, w.selected ? selectedColor : colour, showDirection, width,true);
-					else
-						if (realWidth > 0 && useRealWidth && !showDirection){
-							int tmpWidth = (int) (100 /  (float) (circum / realWidth));
-							if (tmpWidth > width) width = tmpWidth;
-						}
-
-						drawSegment(ls, w.selected ? selectedColor : colour,showDirection, width,dashed);
-				if (!ls.incomplete && showOrderNumber)
-				{
-					try
-					{
-						g.setColor(w.selected ? selectedColor : colour);
-						drawOrderNumber(ls, orderNumber);
+					if (realWidth > 0 && useRealWidth && !showDirection){
+						int tmpWidth = (int) (100 /  (float) (circum / realWidth));
+						if (tmpWidth > width) width = tmpWidth;
 					}
-					catch (IllegalAccessError e) {} //SimplePaintVisitor::drawOrderNumber was private prior to rev #211
-				}
+
+					drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, dashed);
+
+					if (showOrderNumber)
+						drawOrderNumber(lastN, n, orderNumber);
+			
+			lastN = n;
 		}
 	}
@@ -178,15 +168,7 @@
 		Polygon polygon = new Polygon();
 		Point p;
-		boolean first=true;
-		for (Segment ls : w.segments)
+		for (Node n : w.nodes)
 		{
-		    if (ls.incomplete) continue;
-			if(first)
-			{
-				p = nc.getPoint(ls.from.eastNorth);
-				polygon.addPoint(p.x,p.y);
-				first=false;
-			}
-			p = nc.getPoint(ls.to.eastNorth);
+			p = nc.getPoint(n.eastNorth);
 			polygon.addPoint(p.x,p.y);
 		}
@@ -224,29 +206,15 @@
 	 */
 	// Altered - now specify width
-	@Override protected void drawSegment(Segment ls, Color col,boolean showDirection) {
-			if (useRealWidth && showDirection && !ls.selected) showDirection = false;
-			drawSegment(ls,col,showDirection,1,false);
-	}
-
-
-	// Altered - now specify width
-	private void drawSegment (Segment ls, Color col,boolean showDirection, int width,boolean dashed) {
-		//do not draw already visible segments
-		if (ls.shown) return;
-		ls.shown=true;
-		if (ls.incomplete)
-			return;
-		if (ls.selected) {
-		    col = selectedColor;
-		}
-		drawSeg(ls, col, showDirection, width, dashed);
-	}
-		
-	private void drawSeg(Segment ls, Color col,boolean showDirection, int width,boolean dashed) {
+	@Override protected void drawSegment(Node n1, Node n2, Color col, boolean showDirection) {
+		if (useRealWidth && showDirection) showDirection = false;
+		drawSeg(n1, n2, col, showDirection, 1, false);
+	}
+
+	private void drawSeg(Node n1, Node n2, Color col, boolean showDirection, int width, boolean dashed) {
 		if (col != currentColor || width != currentWidth || dashed != currentDashed) {
 			displaySegments(col, width, dashed);
 		}
-		Point p1 = nc.getPoint(ls.from.eastNorth);
-		Point p2 = nc.getPoint(ls.to.eastNorth);
+		Point p1 = nc.getPoint(n1.eastNorth);
+		Point p2 = nc.getPoint(n2.eastNorth);
 		
 		// checking if this segment is visible
@@ -265,6 +233,6 @@
 
 		//g.drawLine(p1.x, p1.y, p2.x, p2.y);
-		currrentPath.moveTo(p1.x, p1.y);
-		currrentPath.lineTo(p2.x, p2.y);
+		currentPath.moveTo(p1.x, p1.y);
+		currentPath.lineTo(p2.x, p2.y);
 
 		if (showDirection) {
@@ -272,7 +240,7 @@
 			//g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI)));
 			//g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI)));
-			currrentPath.lineTo((int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI)));
-			currrentPath.moveTo((int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI)));
-			currrentPath.lineTo(p2.x, p2.y);
+			currentPath.lineTo((int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI)));
+			currentPath.moveTo((int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI)));
+			currentPath.lineTo(p2.x, p2.y);
 		}
 		//g2d.setStroke(new BasicStroke(1));
@@ -286,5 +254,5 @@
 	protected void displaySegments(Color newColor, int newWidth, boolean newDash) {
 	    
-		if (currrentPath != null) {
+		if (currentPath != null) {
 		        Graphics2D g2d = (Graphics2D)g;
 			g2d.setColor(currentColor);
@@ -295,8 +263,8 @@
 				g2d.setStroke(new BasicStroke(currentWidth,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
 			}
-			g2d.draw(currrentPath);
+			g2d.draw(currentPath);
 			g2d.setStroke(new BasicStroke(1));
 			
-			currrentPath = new GeneralPath();
+			currentPath = new GeneralPath();
 			currentColor = newColor;
 			currentWidth = newWidth;
@@ -327,5 +295,4 @@
 		selectedColor = getPreferencesColor("selected", Color.YELLOW);
 		nodeColor = getPreferencesColor("node", Color.RED);
-		segmentColor = getPreferencesColor("segment", darkgreen);
 		dfltWayColor = getPreferencesColor("way", darkblue);
 		incompleteColor = getPreferencesColor("incomplete way", darkerblue);
@@ -341,8 +308,4 @@
 		Collection<Way> noAreaWays = new LinkedList<Way>();
 
-		for (final OsmPrimitive osm : data.segments)
-			if (!osm.deleted)
-				osm.shown=false;
-
 		for (final OsmPrimitive osm : data.ways)
 			if (!osm.deleted && MapPaintPlugin.elemStyles.isArea(osm))
@@ -354,7 +317,4 @@
 			osm.visit(this);
 
-		for (final OsmPrimitive osm : data.segments)
-			if (!osm.deleted)
-				osm.visit(this);
 		
 		for (final OsmPrimitive osm : data.nodes)
