Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 12437)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 12438)
@@ -23,14 +23,10 @@
 	}
 
-	public void displace(double dx, double dy) {
-		min = new EastNorth(min.east() + dx, min.north() + dy);
-		max = new EastNorth(max.east() + dx, max.north() + dy);
+	public boolean contains(EastNorth en, double dx, double dy) {
+		return min.east()+dx <= en.east() && en.east() <= max.east()+dx
+			&& min.north()+dy <= en.north() && en.north() <= max.north()+dy;
 	}
 
-	public boolean contains(EastNorth en) {
-		return min.east() <= en.east() && en.east() <= max.east()
-			&& min.north() <= en.north() && en.north() <= max.north();
-	}
-
+	/* this does not take dx and dy offset into account! */
 	public boolean isVisible(NavigatableComponent nc) {
 		Point minPt = nc.getPoint(min), maxPt = nc.getPoint(max);
@@ -41,10 +37,14 @@
 	}
 
-	public boolean paint(Graphics g, NavigatableComponent nc) {
+	public boolean paint(Graphics g, NavigatableComponent nc, double dx, double dy) {
 		if (image == null || min == null || max == null) return false;
 
-		Point minPt = nc.getPoint(min), maxPt = nc.getPoint(max);
+		EastNorth mi = new EastNorth(min.east()+dx, min.north()+dy);
+		EastNorth ma = new EastNorth(max.east()+dx, max.north()+dy);
+		Point minPt = nc.getPoint(mi), maxPt = nc.getPoint(ma);
 
-		if(!isVisible(nc))
+		/* this is isVisible() but taking dx, dy into account */
+		if(!(g.hitClip(minPt.x, maxPt.y,
+				maxPt.x - minPt.x, minPt.y - maxPt.y)))
 			return false;
 
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java	(revision 12437)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java	(revision 12438)
@@ -20,4 +20,5 @@
 
 	GeorefImage selectedImage;
+	WMSLayer selectedLayer;
 	boolean mouseDown;
 	EastNorth prevEastNorth;
@@ -48,5 +49,6 @@
 			if (layer.visible && layer instanceof WMSLayer) {
 				prevEastNorth=Main.map.mapView.getEastNorth(e.getX(),e.getY());
-				selectedImage = ((WMSLayer)layer).findImage(prevEastNorth);
+				selectedLayer = ((WMSLayer)layer);
+				selectedImage = selectedLayer.findImage(prevEastNorth);
 				if(selectedImage!=null){
 					Main.map.mapView.setCursor
@@ -66,9 +68,7 @@
 			EastNorth eastNorth=
 					Main.map.mapView.getEastNorth(e.getX(),e.getY());
-			if(selectedImage.contains(eastNorth)) {
-				selectedImage.displace(eastNorth.east()-prevEastNorth.east(), 
-									eastNorth.north()-prevEastNorth.north());
-				prevEastNorth = eastNorth;
-			}
+		        selectedLayer.displace(eastNorth.east()-prevEastNorth.east(), 
+				eastNorth.north()-prevEastNorth.north());
+			prevEastNorth = eastNorth;
 			Main.map.mapView.repaint();
 		}
@@ -79,4 +79,6 @@
 		Main.map.mapView.setCursor(Cursor.getDefaultCursor());
 		selectedImage = null;	
+		prevEastNorth = null;
+		selectedLayer = null;
 	}
 
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 12437)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 12438)
@@ -56,4 +56,6 @@
 	protected int day = 10;
 	protected int minZoom = 3;
+	protected double dx = 0.0;
+	protected double dy = 0.0;
 	protected double pixelPerDegree;
 	protected GeorefImage[][] images = new GeorefImage[dax][day];
@@ -143,7 +145,12 @@
 			for(int x = 0; x<dax; ++x)
 				for(int y = 0; y<day; ++y)
-					images[modulo(x,dax)][modulo(y,day)].paint(g, mv);
+					images[modulo(x,dax)][modulo(y,day)].paint(g, mv, dx, dy);
 		} else
 			downloadAndPaintVisible(g, mv);
+	}
+
+	public void displace(double dx, double dy) {
+		this.dx += dx;
+		this.dy += dy;
 	}
 
@@ -162,6 +169,5 @@
 			for(int y = bminy; y<bmaxy; ++y){
 				GeorefImage img = images[modulo(x,dax)][modulo(y,day)];
-				if(!img.paint(g, mv) && !img.downloadingStarted){
-					//System.out.println(tr("------{0}|{1}|{2}|{3}", modulo(x,dax), modulo(y,day), img.downloadingStarted, img.isVisible(mv)));
+				if(!img.paint(g, mv, dx, dy) && !img.downloadingStarted){
 					img.downloadingStarted = true;
 					img.image = null;
@@ -205,5 +211,5 @@
 			for(int y = 0; y<day; ++y)
 					if(images[x][y].image!=null && images[x][y].min!=null && images[x][y].max!=null)
-						if(images[x][y].contains(eastNorth))
+						if(images[x][y].contains(eastNorth, dx, dy))
 							return images[x][y];
 		return null;
