Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfilePlugin.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfilePlugin.java	(revision 28148)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfilePlugin.java	(revision 28149)
@@ -46,5 +46,4 @@
 			eleMode = new ElevationMapMode("Elevation profile", Main.map);
 			eleModeButton = new IconToggleButton(eleMode);
-			eleModeButton.setAutoHideDisabledButton(true);
 		} catch (Exception e1) {
 			System.err.println("Init of ElevationProfilePlugin failed: " + e1);
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java	(revision 28148)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java	(revision 28149)
@@ -35,4 +35,5 @@
 import org.openstreetmap.josm.plugins.elevation.IElevationProfile;
 import org.openstreetmap.josm.plugins.elevation.WayPointHelper;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -133,10 +134,11 @@
 			MapView mv, WayPoint wpt, ElevationWayPointKind kind) {
 
-		if (mv == null || profile == null || wpt == null) {
+		CheckParameterUtil.ensureParameterNotNull(g, "graphics");
+		CheckParameterUtil.ensureParameterNotNull(profile, "profile");
+		CheckParameterUtil.ensureParameterNotNull(mv, "map view");
+				
+		if (wpt == null) {
 			System.err.println(String.format(
-					"Cannot paint: mv=%s, prof=%s, wpt=%s", mv, profile, wpt));
-			if (wpt == null) {
-				throw new RuntimeException("WPT must not be null, profile " + profile);
-			}
+					"Cannot paint: mv=%s, prof=%s, wpt=%s", mv, profile, wpt));			
 			return;
 		}
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java	(revision 28148)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java	(revision 28149)
@@ -43,4 +43,5 @@
 public class ElevationProfileLayer extends
 org.openstreetmap.josm.gui.layer.Layer implements IElevationProfileSelectionListener {
+	private static final double Level_Factor = 100.0;
 	private IElevationProfile profile;
 	private IElevationProfileRenderer renderer = new DefaultElevationProfileRenderer();
@@ -159,33 +160,33 @@
 		renderer.beginRendering();
 		if (profile != null) {			
+			// paint way points one by one
 			for (WayPoint wpt : profile.getWayPoints()) {
 				int ele = (int) WayPointHelper.getElevation(wpt);
 
 				if (lastWpt != null) {
-					/*
-					int h1 = WayPointHelper.getHourOfWayPoint(wpt);
-					int h2 = WayPointHelper.getHourOfWayPoint(lastWpt);
-					*/
-					int ele1 = (int)(ele / 100.0);
-					int ele2 = (int)(lastEle / 100.0);
+					// normalize to levels
+					int ele1 = (int)(ele / Level_Factor);
+					int ele2 = (int)(lastEle / Level_Factor);
 					
-					// Check, if we passed an elevation level
+					// plain way point by default
+					ElevationWayPointKind kind = ElevationWayPointKind.Plain;
+					// check, if we passed an elevation level
+					// We assume, that we cannot pass more than one levels between two way points ;-)
 					if (ele1 != ele2 && Math.abs(ele1 - ele2) == 1) { 
 						if (ele1 > ele2) { // we went down?
-							renderer.renderWayPoint(g, profile, mv, wpt,
-								ElevationWayPointKind.ElevationLevelGain);
+							kind =ElevationWayPointKind.ElevationLevelGain; 
 						} else {
-							renderer.renderWayPoint(g, profile, mv, wpt,
-									ElevationWayPointKind.ElevationLevelLoss);
+							kind =ElevationWayPointKind.ElevationLevelLoss;
 						}
 					} else { // check for elevation gain or loss
 						if (ele > lastEle) { // we went down?
-							renderer.renderWayPoint(g, profile, mv, wpt,
-									ElevationWayPointKind.ElevationGain);
+							kind =ElevationWayPointKind.ElevationGain;
 						} else {
-							renderer.renderWayPoint(g, profile, mv, wpt,
-									ElevationWayPointKind.ElevationLoss);
+							kind =ElevationWayPointKind.ElevationLoss;
 						}
 					}
+					
+					// render way point
+					renderer.renderWayPoint(g, profile, mv, wpt, kind);
 				}
 
@@ -194,5 +195,7 @@
 				lastWpt = wpt;
 			}
-
+			
+			// now we paint special way points in emphasized style 
+			
 			// paint selected way point, if available
 			if (selWayPoint != null) {
