Index: /trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 11225)
+++ /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 11226)
@@ -420,5 +420,12 @@
     }
 
-    private void paintLayer(Layer layer, Graphics2D g, Bounds box) {
+    /**
+     * Paints the given layer to the graphics object, using the current state of this map view.
+     * @param layer The layer to draw.
+     * @param g A graphics object. It should have the width and height of this component
+     * @throws IllegalArgumentException If the layer is not part of this map view.
+     * @since 11226
+     */
+    public void paintLayer(Layer layer, Graphics2D g) {
         try {
             LayerPainter painter = registeredLayers.get(layer);
@@ -435,5 +442,5 @@
             g.setPaintMode();
         } catch (RuntimeException t) {
-            BugReport.intercept(t).put("layer", layer).put("bounds", box).warn();
+            BugReport.intercept(t).put("layer", layer).warn();
         }
     }
@@ -480,5 +487,4 @@
         Graphics2D tempG = offscreenBuffer.createGraphics();
         tempG.setClip(g.getClip());
-        Bounds box = getLatLonBounds(g.getClipBounds());
 
         if (!canUseBuffer || nonChangedLayersBuffer == null) {
@@ -493,5 +499,5 @@
 
             for (int i = 0; i < nonChangedLayersCount; i++) {
-                paintLayer(visibleLayers.get(i), g2, box);
+                paintLayer(visibleLayers.get(i), g2);
             }
         } else {
@@ -501,5 +507,5 @@
                 g2.setClip(g.getClip());
                 for (int i = nonChangedLayers.size(); i < nonChangedLayersCount; i++) {
-                    paintLayer(visibleLayers.get(i), g2, box);
+                    paintLayer(visibleLayers.get(i), g2);
                 }
             }
@@ -514,9 +520,9 @@
 
         for (int i = nonChangedLayersCount; i < visibleLayers.size(); i++) {
-            paintLayer(visibleLayers.get(i), tempG, box);
+            paintLayer(visibleLayers.get(i), tempG);
         }
 
         try {
-            drawTemporaryLayers(tempG, box);
+            drawTemporaryLayers(tempG, getLatLonBounds(g.getClipBounds()));
         } catch (RuntimeException e) {
             BugReport.intercept(e).put("temporaryLayers", temporaryLayers).warn();
