Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 26490)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 26501)
@@ -95,5 +95,6 @@
   
     Point getLastPoint() {
-        return getPoint(points.get(lastIdx));
+        if (lastIdx<points.size()) return getPoint(points.get(lastIdx));
+        else return null;
     }
 
Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FDSettings.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FDSettings.java	(revision 26490)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FDSettings.java	(revision 26501)
@@ -12,5 +12,6 @@
     public Color COLOR_SELECTEDFRAGMENT;
     public Color COLOR_EDITEDFRAGMENT;
-
+    public Color COLOR_SIMPLIFIED;
+    
     public double maxDist;
     public double epsilonMult;
@@ -33,4 +34,5 @@
     //1="Simplify and wait", 2="Save as is"
     public int simplifyMode;
+    public float lineWidth;
     
     public void loadPrefs() {
@@ -40,4 +42,5 @@
         COLOR_NORMAL = Main.pref.getColor("fastdraw.color.normal", Color.red);
         COLOR_SELECTEDFRAGMENT = Main.pref.getColor("fastdraw.color.select", Color.blue);
+        COLOR_SIMPLIFIED = Main.pref.getColor("fastdraw.color.simplified", Color.orange);
         maxDist = Main.pref.getDouble("fastdraw.maxdist", 5);
         epsilonMult = Main.pref.getDouble("fastdraw.epsilonmult", 1.1);
@@ -52,4 +55,5 @@
         fixedSpacebar = Main.pref.getBoolean("fastdraw.fixedspacebar", false);
         simplifyMode = Main.pref.getInteger("fastdraw.simplifymode", 0);
+        lineWidth = (float) Main.pref.getDouble("fastdraw.linewidth", 2);
     }
 
@@ -60,4 +64,5 @@
          Main.pref.putColor("fastdraw.color.normal", COLOR_NORMAL);
          Main.pref.putColor("fastdraw.color.select", COLOR_SELECTEDFRAGMENT);
+         Main.pref.getColor("fastdraw.color.simplified", COLOR_SIMPLIFIED);
          Main.pref.putDouble("fastdraw.maxdist", maxDist);
          Main.pref.putDouble("fastdraw.epsilonmult", epsilonMult);
@@ -72,4 +77,5 @@
          Main.pref.put("fastdraw.fixedspacebar", fixedSpacebar);
          Main.pref.putInteger("fastdraw.simplifymode", simplifyMode);
+         Main.pref.putDouble("fastdraw.linewidth",(double)lineWidth);
          try {Main.pref.save();} catch (IOException e) {
              System.err.println(tr("Can not save preferences"));
Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 26490)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 26501)
@@ -43,4 +43,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.MapView;
@@ -67,6 +68,6 @@
     private boolean shift;
     private double eps;
-    private final Stroke strokeForSimplified;
-    private final Stroke strokeForOriginal;
+    private Stroke strokeForSimplified;
+    private Stroke strokeForOriginal;
     private final Cursor cursorDraw;
     private final Cursor cursorCtrl;
@@ -96,8 +97,4 @@
                 KeyEvent.VK_T, Shortcut.GROUP_EDIT), mapFrame, Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
         line=new DrawnPolyLine();
-        strokeForOriginal = new BasicStroke();
-        strokeForDelete = new BasicStroke(3);
-        strokeForSimplified = new BasicStroke(1,BasicStroke.CAP_ROUND,BasicStroke.JOIN_BEVEL,5f,
-                new float[]{5.f,5f},0f);
         cursorDraw = ImageProvider.getCursor("crosshair", null);
         cursorCtrl = ImageProvider.getCursor("crosshair", "fixed");
@@ -119,4 +116,10 @@
         settings.loadPrefs();
         settings.savePrefs();
+
+        strokeForOriginal = new BasicStroke(settings.lineWidth);
+        strokeForDelete = new BasicStroke(3);
+        //strokeForSimplified = new BasicStroke(1,BasicStroke.CAP_ROUND,BasicStroke.JOIN_BEVEL,5f,
+        //        new float[]{5.f,5f},0f);
+        strokeForSimplified = strokeForOriginal;
         
         eps=settings.startingEps;
@@ -130,14 +133,6 @@
         Main.map.mapView.addTemporaryLayer(this);
 
-        updateCursor();
-        Collection<Way> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
-        if (selectedWays!=null // if there is a selection
-            && selectedWays.size()==1 // and one way is selected
-            && line.getPoints().size()==0) /* and ther is no already drawn line */ {
-            // we can start drawing new way starting from old one
-            Way w = selectedWays.iterator().next();
-            
-            if (w.isNew()) loadFromWay(w);
-        }
+        //tryToLoadWay();
+        
         timer = new Timer(0, new ActionListener() {
             @Override
@@ -205,10 +200,14 @@
         g.setColor(settings.COLOR_FIXED);
         g.fillOval(p1.x - 3, p1.y - 3, 7, 7);
-        Color lineColor=settings.COLOR_NORMAL;
+        Color lineColor,initLineColor;
+        initLineColor = line.wasSimplified() ? settings.COLOR_SIMPLIFIED: settings.COLOR_NORMAL;
+        lineColor = initLineColor;
+        int rp,dp;
+        dp=line.wasSimplified() ? 7:(int)(3+((int) settings.lineWidth)/2*2);  rp=dp/2;
         if (pts.size() > 1) {
         Iterator<LatLon> it1,it2;
         it1=pts.listIterator(0);
         it2=pts.listIterator(1);
-            for (int i = 0; i < pts.size() - 1; i++) {
+        for (int i = 0; i < pts.size() - 1; i++) {
                 pp1 = it1.next();
                 p1 = line.getPoint(pp1);
@@ -221,9 +220,9 @@
   //                  g.fillOval(p2.x - 5, p2.y - 5, 11, 11);
                 if (line.isFixed(pp2)) {
-                    lineColor=settings.COLOR_NORMAL;
+                    lineColor=initLineColor;
                     g.setColor(settings.COLOR_FIXED);
                     g.fillOval(p2.x - 3, p2.y - 3, 7, 7);
                 } else {
-                    g.fillRect(p2.x - 1, p2.y - 1, 3, 3);
+                    g.fillRect(p2.x - rp, p2.y - rp, dp, dp);
                 }
                 if (!drawing) {
@@ -246,18 +245,19 @@
                 }
             }
-            if (settings.drawLastSegment && !drawing && !shift && nearestIdx<0 && !line.wasSimplified()) {
-                // draw line to current point
-                g.setColor(lineColor);
-                Point lp=line.getLastPoint();
-                Point mp=Main.map.mapView.getMousePosition();
-                if (lp!=null && mp!=null) g.drawLine(lp.x,lp.y,mp.x,mp.y);
-            }
-            if (deltaChanged) {
-                g.setColor(lineColor);
-                Point lp=line.getLastPoint();
-                int r=(int) settings.minPixelsBetweenPoints;
-                if (lp!=null) g.drawOval(lp.x-r,lp.y-r,2*r,2*r);
-            }
-        }
+        }
+        if (settings.drawLastSegment && !drawing && !shift && nearestIdx<0 && !line.wasSimplified()) {
+            // draw line to current point
+            g.setColor(lineColor);
+            Point lp=line.getLastPoint();
+            Point mp=Main.map.mapView.getMousePosition();
+            if (lp!=null && mp!=null) g.drawLine(lp.x,lp.y,mp.x,mp.y);
+        }
+        if (deltaChanged) {
+            g.setColor(lineColor);
+            Point lp=line.getLastPoint();
+            int r=(int) settings.minPixelsBetweenPoints;
+            if (lp!=null) g.drawOval(lp.x-r,lp.y-r,2*r,2*r);
+        }
+
     }
 
@@ -487,5 +487,22 @@
             // less details
             e.consume();
+            Point lastPoint = line.getLastPoint();
             line.moveToTheEnd();
+            if (lastPoint==null || lastPoint.equals(line.getLastPoint())) {
+                 if (line.getPoints().size()>5) {
+                 boolean answer = ConditionalOptionPaneUtil.showConfirmationDialog(
+                    "delete_drawn_line", Main.parent,
+                    tr("Are you sure you do not want to save the line containing {0} points?",
+                         line.getPoints().size()), tr("Delete confirmation"),
+                    JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_OPTION );
+                 if(!answer) break;
+                }
+                newDrawing(); // stop drawing
+                exitMode();
+                Main.map.selectSelectTool(false);
+            }
+        break;
+        case KeyEvent.VK_T:
+            tryToLoadWay();
         break;
         case KeyEvent.VK_Q:
@@ -541,4 +558,5 @@
         line.clear();
     }
+    
     private void saveAsWay(boolean autoExit) {
         List<LatLon> pts=line.getPoints();
@@ -598,4 +616,5 @@
         } else cmds.add(new AddCommand(w));
         Command c = new SequenceCommand(tr("Draw the way by mouse"), cmds);
+        if (!Main.main.hasEditLayer()) return;
         Main.main.undoRedo.add(c);
         lineWasSaved = true;
@@ -609,10 +628,4 @@
     }
 
-  
-
-    private void repaint() {
-        Main.map.mapView.repaint();
-    }
-
     public void back() {
         line.undo();
@@ -632,12 +645,10 @@
         settings.minPixelsBetweenPoints*=k;
         deltaChanged=true;
-        setStatusLine(tr("min distance={0} pixes",(int)settings.minPixelsBetweenPoints));
+        
+        setStatusLine(tr("min distance={0} pixels or {1} m",(int)settings.minPixelsBetweenPoints,
+                mv.getDist100Pixel()/100*settings.minPixelsBetweenPoints));
         repaint();
     }
 
-    private void setStatusLine(String tr) {
-        statusText=tr;
-        updateStatusLine();
-    }
 
     /*private Node findClosestNode(LatLon p, double d) {
@@ -658,7 +669,38 @@
     }*/
 
-
-
-
+    private void loadFromWay(Way w) {
+        List<LatLon> pts=line.getPoints();
+
+        Collection<Command> cmds = new LinkedList<Command>();
+        
+        Node firstNode=null;
+        Object[] nodes = w.getNodes().toArray();
+        int n=nodes.length;
+        if (w.isClosed()) n--;
+        for (int i=0;i<n;i++) {
+            Node nd=(Node) nodes[i];
+            line.addLast(nd.getCoor());
+        }
+        if (w.isClosed()) line.closeLine();
+        oldNodes = w.getNodes();
+        List <OsmPrimitive> wl = new ArrayList(); wl.add(w);
+        
+        Command c = DeleteCommand.delete(getEditLayer(), wl, false);
+        if (c != null) cmds.add(c);
+        delCmd = new SequenceCommand(tr("Convert way to FastDraw line"), cmds);
+        Main.main.undoRedo.add(delCmd);
+    }
+
+    private void setStatusLine(String tr) {
+        statusText=tr;
+        updateStatusLine();
+    }
+
+    private void showSimplifyHint() {
+            setStatusLine(tr("Eps={0}, {1} points, {2} p/km", 
+                eps, line.getSimplePointsCount(),line.getNodesPerKm(settings.pkmBlockSize))+" "
+            +SIMPLIFYMODE_MESSAGE);
+    }
+    
     private void updateCursor() {
         if (shift) Main.map.mapView.setCursor(cursorShift); else
@@ -671,4 +713,8 @@
 
     }
+
+    private void repaint() {
+        Main.map.mapView.repaint();
+    }
 // </editor-fold>
 
@@ -686,32 +732,17 @@
 // </editor-fold>
 
-    private void showSimplifyHint() {
-            setStatusLine(tr("Eps={0}, {1} points, {2} p/km", 
-                eps, line.getSimplePointsCount(),line.getNodesPerKm(settings.pkmBlockSize))+" "
-            +SIMPLIFYMODE_MESSAGE);
-    }
-
-    private void loadFromWay(Way w) {
-        List<LatLon> pts=line.getPoints();
-
-        Collection<Command> cmds = new LinkedList<Command>();
-        
-        Node firstNode=null;
-        Object[] nodes = w.getNodes().toArray();
-        int n=nodes.length;
-        if (w.isClosed()) n--;
-        for (int i=0;i<n;i++) {
-            Node nd=(Node) nodes[i];
-            line.addLast(nd.getCoor());
-        }
-        if (w.isClosed()) line.closeLine();
-        oldNodes = w.getNodes();
-        List <OsmPrimitive> wl = new ArrayList(); wl.add(w);
-        
-        Command c = DeleteCommand.delete(getEditLayer(), wl, false);
-        if (c != null) cmds.add(c);
-        delCmd = new SequenceCommand(tr("Convert way to FastDraw line"), cmds);
-        Main.main.undoRedo.add(delCmd);
-    }
+    private void tryToLoadWay() {
+        updateCursor();
+        Collection<Way> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
+        if (selectedWays!=null // if there is a selection
+            && selectedWays.size()==1 // and one way is selected
+            && line.getPoints().size()==0) /* and ther is no already drawn line */ {
+            // we can start drawing new way starting from old one
+            Way w = selectedWays.iterator().next();
+            
+            if (w.isNew()) loadFromWay(w);
+        }
+    }
+
 
 }
