Index: /applications/editors/josm/plugins/FastDraw/build.xml
===================================================================
--- /applications/editors/josm/plugins/FastDraw/build.xml	(revision 26454)
+++ /applications/editors/josm/plugins/FastDraw/build.xml	(revision 26455)
@@ -30,5 +30,5 @@
 <project name="FastDraw" default="dist" basedir=".">
     <!-- enter the SVN commit message -->
-    <property name="commit.message" value="FastDraw: better linux compatibility"/>
+    <property name="commit.message" value="FastDraw: draw last line segment, up/down=change minDelta"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="4201"/>
Index: /applications/editors/josm/plugins/FastDraw/nbproject/project.xml
===================================================================
--- /applications/editors/josm/plugins/FastDraw/nbproject/project.xml	(revision 26454)
+++ /applications/editors/josm/plugins/FastDraw/nbproject/project.xml	(revision 26455)
@@ -16,5 +16,5 @@
             <ide-actions>
                 <action name="build">
-                    <target>dist</target>
+                    <target>compile</target>
                 </action>
                 <action name="clean">
@@ -26,7 +26,16 @@
                 <action name="rebuild">
                     <target>clean</target>
-                    <target>dist</target>
+                    <target>compile</target>
+                </action>
+                <action name="debug">
+                    <script>nbproject/ide-targets.xml</script>
+                    <target>debug-nb</target>
                 </action>
             </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>../../dist/FastDraw.jar</location>
+                <build-target>compile</build-target>
+            </export>
             <view>
                 <items>
@@ -44,4 +53,5 @@
                     <ide-action name="clean"/>
                     <ide-action name="run"/>
+                    <ide-action name="debug"/>
                 </context-menu>
             </view>
@@ -51,4 +61,5 @@
                 <package-root>src</package-root>
                 <classpath mode="compile">../../core/src</classpath>
+                <built-to>../../dist/FastDraw.jar</built-to>
                 <source-level>1.6</source-level>
             </compilation-unit>
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 26454)
+++ /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FDSettings.java	(revision 26455)
@@ -23,4 +23,5 @@
     public double maxPointsPerKm;
     public int pkmBlockSize;
+    public boolean drawLastSegment;
     
     public void loadPrefs() {
@@ -37,4 +38,5 @@
         maxPointsPerKm = Main.pref.getDouble("fastdraw.maxpkm", 20);
         pkmBlockSize = Main.pref.getInteger("fastdraw.pkmblocksize", 10);
+        drawLastSegment = Main.pref.getBoolean("fastdraw.drawlastsegment", true);
     }
 
@@ -52,4 +54,5 @@
          Main.pref.putDouble("fastdraw.maxpkm",maxPointsPerKm);
          Main.pref.putInteger("fastdraw.pkmblocksize",pkmBlockSize);
+         Main.pref.put("fastdraw.drawlastsegment",drawLastSegment);
          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 26454)
+++ /applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 26455)
@@ -83,5 +83,5 @@
     private List<Node> oldNodes;
     
-    private final TreeSet set = new TreeSet();
+    private final TreeSet<Integer> set = new TreeSet<Integer>();
     private Timer timer;
   
@@ -242,4 +242,11 @@
                 }
             }
+            if (settings.drawLastSegment && !drawing && !shift && !line.wasSimplified()) {
+                // draw line to current point
+                g.setColor(lineColor);
+                Point lp=line.getLastPoint();
+                Point mp=Main.map.mapView.getMousePosition();
+                g.drawLine(lp.x,lp.y,mp.x,mp.y);
+            }
         }
     }
@@ -363,4 +370,5 @@
         int nearestIdx2=line.findClosestPoint(e.getPoint(),settings.maxDist);
         if (nearestIdx != nearestIdx2) {nearestIdx=nearestIdx2; updateCursor();needRepaint=true;}
+        if (settings.drawLastSegment) needRepaint=true;
         
         if (!drawing) {
@@ -433,10 +441,12 @@
             // more details
             e.consume();
-            changeEpsilon(settings.epsilonMult);
+            if (line.wasSimplified()) changeEpsilon(settings.epsilonMult);
+            else changeDelta(1/1.1);
         break;
         case KeyEvent.VK_UP:
             // less details
             e.consume();
-            changeEpsilon(1/settings.epsilonMult);
+            if (line.wasSimplified()) changeEpsilon(1/settings.epsilonMult);
+            else changeDelta(1.1);
         break;
         case KeyEvent.VK_ESCAPE:
@@ -576,4 +586,10 @@
     }
 
+    void changeDelta(double k) {
+        settings.minPixelsBetweenPoints*=k;
+        setStatusLine(tr("min distance={0} pixes",(int)settings.minPixelsBetweenPoints));
+        
+    }
+
     private void setStatusLine(String tr) {
         statusText=tr;
