Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java	(revision 27403)
@@ -13,4 +13,5 @@
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.plugins.piclayer.command.TransformCommand;
 import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -24,13 +25,17 @@
 	protected EastNorth prevEastNorth = null;
 	protected Point2D prevMousePoint = null;
+	protected TransformCommand currentCommand = null;
+	private String actionName;
 
-	public GenericPicTransformAction(String name, String iconName,
+	public GenericPicTransformAction(String name, String actionName, String iconName,
 			String tooltip, Shortcut shortcut, MapFrame mapFrame, Cursor cursor) {
 		super(name, iconName, tooltip, shortcut, mapFrame, cursor);
+		this.actionName = actionName;
 	}
 
-	public GenericPicTransformAction(String name, String iconName,
+	public GenericPicTransformAction(String name, String actionName, String iconName,
 			String tooltip, MapFrame mapFrame, Cursor cursor) {
 		super(name, iconName, tooltip, mapFrame, cursor);
+        this.actionName = actionName;
 	}
 
@@ -61,4 +66,5 @@
 	            // try to find and fill selected point if possible
 	            selectedPoint = currentLayer.findSelectedPoint(e.getPoint());
+	            currentCommand = new TransformCommand(currentLayer, actionName);
 	        }
 	    }
@@ -82,4 +88,5 @@
 	    // End action
 	    isDragging = false;
+	    currentCommand.addIfChanged();
 	}
 
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/ResetCalibrationAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/ResetCalibrationAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/ResetCalibrationAction.java	(revision 27403)
@@ -5,6 +5,6 @@
 import java.awt.event.ActionEvent;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.plugins.piclayer.command.TransformCommand;
 import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract;
 import org.openstreetmap.josm.plugins.piclayer.transform.PictureTransform;
@@ -18,9 +18,10 @@
 		this.layer = layer;
 	}
-	
+
 	@Override
 	public void actionPerformed(ActionEvent arg0) {
+	    TransformCommand currentCommand = new TransformCommand(layer, tr("Calibration reset"));
 		layer.resetCalibration();
-		Main.map.mapView.repaint();
+		currentCommand.addIfChanged();
 	}
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/MovePictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/MovePictureAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/MovePictureAction.java	(revision 27403)
@@ -26,8 +26,8 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.plugins.piclayer.actions.GenericPicTransformAction;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.data.coor.EastNorth;
 
 /**
@@ -41,5 +41,5 @@
      */
     public MovePictureAction(MapFrame frame) {
-        super(tr("PicLayer move"), "move", tr("Drag to move the picture"), frame, ImageProvider.getCursor("crosshair", null));
+        super(tr("PicLayer move"), tr("Moved"), "move", tr("Drag to move the picture"), frame, ImageProvider.getCursor("crosshair", null));
     }
 
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/RotatePictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/RotatePictureAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/RotatePictureAction.java	(revision 27403)
@@ -41,5 +41,5 @@
      */
     public RotatePictureAction(MapFrame frame) {
-        super(tr("PicLayer rotate"), "rotate", tr("Drag to rotate the picture"), frame, ImageProvider.getCursor("crosshair", null));
+        super(tr("PicLayer rotate"), tr("Rotated"), "rotate", tr("Drag to rotate the picture"), frame, ImageProvider.getCursor("crosshair", null));
     }
 
@@ -52,5 +52,5 @@
         else {
             factor = Main.pref.getDouble("piclayer.rotatefactors.low_precision", 10.0 );
-        }            
+        }
         currentLayer.rotatePictureBy( ( e.getY() - prevMousePoint.getY() ) / factor );
 	}
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScalePictureActionAbstract.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScalePictureActionAbstract.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScalePictureActionAbstract.java	(revision 27403)
@@ -38,8 +38,9 @@
      * Constructor
      */
-    public ScalePictureActionAbstract (String name, String icon, String tooltip, MapFrame frame) {
-        super(name, icon, tooltip, frame, ImageProvider.getCursor("crosshair", null));
+    public ScalePictureActionAbstract (String name, String actionName, String icon, String tooltip, MapFrame frame) {
+        super(name, actionName, icon, tooltip, frame, ImageProvider.getCursor("crosshair", null));
     }
 
+    @Override
     protected void doAction(MouseEvent e) {
         double factor;
@@ -49,5 +50,5 @@
         else {
             factor = Main.pref.getDouble("piclayer.scalefactors.low_precision", 1.015);
-        }            
+        }
         doTheScale( Math.pow(factor, prevMousePoint.getY() - e.getY() ) );
     }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleXPictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleXPictureAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleXPictureAction.java	(revision 27403)
@@ -35,7 +35,8 @@
      */
     public ScaleXPictureAction(MapFrame frame) {
-        super(tr("PicLayer scale X"), "scale_x", tr("Drag to scale the picture in the X Axis"), frame);
+        super(tr("PicLayer scale X"), tr("Scaled by X"), "scale_x", tr("Drag to scale the picture in the X Axis"), frame);
     }
 
+    @Override
     public void doTheScale( double scale ) {
             currentLayer.scalePictureBy( scale, 1.0 );
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleXYPictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleXYPictureAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleXYPictureAction.java	(revision 27403)
@@ -35,7 +35,8 @@
      */
     public ScaleXYPictureAction(MapFrame frame) {
-        super(tr("PicLayer scale"), "scale", tr("Drag to scale the picture in the X and Y Axis"), frame);
+        super(tr("PicLayer scale"), tr("Scaled"), "scale", tr("Drag to scale the picture in the X and Y Axis"), frame);
     }
 
+    @Override
     public void doTheScale( double scale ) {
             currentLayer.scalePictureBy( scale, scale );
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleYPictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleYPictureAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ScaleYPictureAction.java	(revision 27403)
@@ -35,7 +35,8 @@
      */
     public ScaleYPictureAction(MapFrame frame) {
-        super(tr("PicLayer scale Y"), "scale_y", tr("Drag to scale the picture in the Y Axis"), frame);
+        super(tr("PicLayer scale Y"), tr("Scaled by Y"), "scale_y", tr("Drag to scale the picture in the Y Axis"), frame);
     }
 
+    @Override
     public void doTheScale( double scale ) {
         currentLayer.scalePictureBy( 1.0, scale );
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ShearPictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ShearPictureAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/ShearPictureAction.java	(revision 27403)
@@ -28,8 +28,8 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.plugins.piclayer.actions.GenericPicTransformAction;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.data.coor.EastNorth;
 
 /**
@@ -43,5 +43,5 @@
      */
     public ShearPictureAction(MapFrame frame) {
-        super(tr("PicLayer shear"), "shear", tr("Drag to shear the picture"), frame, ImageProvider.getCursor("crosshair", null));
+        super(tr("PicLayer shear"), tr("Sheared"), "shear", tr("Drag to shear the picture"), frame, ImageProvider.getCursor("crosshair", null));
     }
 
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/MovePointAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/MovePointAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/MovePointAction.java	(revision 27403)
@@ -7,5 +7,4 @@
 import java.awt.geom.Point2D;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.plugins.piclayer.actions.GenericPicTransformAction;
@@ -17,5 +16,5 @@
 
 	public MovePointAction(MapFrame frame) {
-        super(tr("PicLayer Move point"), "movepoint", tr("Drag or create point on the picture"), frame, ImageProvider.getCursor("crosshair", null));
+        super(tr("PicLayer Move point"), tr("Point added/moved"), "movepoint", tr("Drag or create point on the picture"), frame, ImageProvider.getCursor("crosshair", null));
 	}
 
@@ -42,8 +41,9 @@
 			if (selectedPoint == null)
 				currentLayer.getTransformer().addOriginPoint(pressed);
+
+			currentCommand.addIfChanged();
 		} catch (NoninvertibleTransformException e1) {
 			e1.printStackTrace();
 		}
-		Main.map.mapView.repaint();
 	}
 
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/TransformPointAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/TransformPointAction.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/TransformPointAction.java	(revision 27403)
@@ -17,5 +17,5 @@
 
 	public TransformPointAction(MapFrame frame) {
-		super(tr("PicLayer Transform point"), "transformpoint", tr("Transform point on the picture"), frame, ImageProvider.getCursor("crosshair", null));
+		super(tr("PicLayer Transform point"), tr("Point transformed"), "transformpoint", tr("Transform point on the picture"), frame, ImageProvider.getCursor("crosshair", null));
 	}
 
@@ -30,4 +30,6 @@
 			        currentLayer.getTransformer().updatePair(selectedPoint, pressed);
 			}
+
+			currentCommand.addIfChanged();
 		} catch (NoninvertibleTransformException e1) {
 			e1.printStackTrace();
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 27403)
@@ -575,3 +575,7 @@
         return selected;
     }
+
+    public void saveTransformCommand() {
+
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/transform/PictureTransform.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/transform/PictureTransform.java	(revision 27296)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/transform/PictureTransform.java	(revision 27403)
@@ -12,10 +12,8 @@
 
 	private List<Point2D> originPoints;
-	private List<Point2D> desiredPoints;
 
 	public PictureTransform() {
 		cachedTransform = new AffineTransform();
 		originPoints = new ArrayList<Point2D>(3);
-		desiredPoints = new ArrayList<Point2D>(3);
 	}
 
@@ -24,19 +22,5 @@
 	}
 
-	public List<? extends Point2D> getOriginPoints() {
-		return originPoints;
-	}
-
-	public List<? extends Point2D> getDesiredPoints() {
-		return desiredPoints;
-	}
-
-	public void addDesiredPoint(Point2D picturePoint) {
-		if (desiredPoints.size() < 3)
-			desiredPoints.add(picturePoint);
-		trySolve();
-	}
-
-	private AffineTransform solveEquation() throws NoSolutionException {
+	private AffineTransform solveEquation(List<Point2D> desiredPoints) throws NoSolutionException {
 		Matrix3D X = new Matrix3D(originPoints);
 		Matrix3D Y = new Matrix3D(desiredPoints);
@@ -49,24 +33,10 @@
 		if (originPoints.size() < 3)
 			originPoints.add(originPoint);
-		trySolve();
 	}
 
 	public void resetCalibration() {
 		originPoints.clear();
-		desiredPoints.clear();
 		modified = false;
 		cachedTransform = new AffineTransform();
-	}
-
-	private void trySolve() {
-		if (desiredPoints.size() == 3 && originPoints.size() == 3) {
-			try {
-				cachedTransform.concatenate(solveEquation());
-				modified = true;
-				desiredPoints.clear();
-			} catch (NoSolutionException e) {
-				System.err.println(e.getMessage());
-			}
-		}
 	}
 
@@ -86,5 +56,5 @@
 			return;
 
-		desiredPoints.clear();
+		List<Point2D> desiredPoints = new ArrayList<Point2D>(3);
 
 		for (Point2D origin : originPoints) {
@@ -94,6 +64,18 @@
 				desiredPoints.add(origin);
 		}
-		trySolve();
+		trySolve(desiredPoints);
 	}
+
+    private void trySolve(List<Point2D> desiredPoints) {
+        if (desiredPoints.size() == 3 && originPoints.size() == 3) {
+            try {
+                cachedTransform.concatenate(solveEquation(desiredPoints));
+                modified = true;
+                desiredPoints.clear();
+            } catch (NoSolutionException e) {
+                System.err.println(e.getMessage());
+            }
+        }
+    }
 
 	public void replaceOriginPoint(Point2D originPoint, Point2D newOriginPoint) {
@@ -135,3 +117,15 @@
         modified = false;
     }
+
+    public void setTransform(AffineTransform newTransform) {
+        cachedTransform = new AffineTransform(newTransform);
+    }
+
+    public List<Point2D> getOriginPoints() {
+        return originPoints;
+    }
+
+    public void setOriginPoints(List<Point2D> list) {
+        this.originPoints = new ArrayList<Point2D>(list);
+    }
 }
