Index: /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 6508)
+++ /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 6509)
@@ -31,4 +31,5 @@
 import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
 import org.openstreetmap.josm.gui.dialogs.ValidatorDialog.ValidatorBoundingXYVisitor;
+import org.openstreetmap.josm.gui.download.DownloadDialog;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -244,9 +245,10 @@
         }
         else if (mode.equals("download")) {
-            if (!Main.pref.get("osm-download.bounds").isEmpty()) {
+            Bounds bounds = DownloadDialog.getSavedDownloadBounds();
+            if (bounds != null) {
                 try {
-                    v.visit(new Bounds(Main.pref.get("osm-download.bounds"), ";"));
+                    v.visit(bounds);
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    Main.warn(e);
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DownloadAction.java	(revision 6508)
+++ /trunk/src/org/openstreetmap/josm/actions/DownloadAction.java	(revision 6509)
@@ -26,4 +26,8 @@
  */
 public class DownloadAction extends JosmAction {
+    
+    /**
+     * Constructs a new {@code DownloadAction}.
+     */
     public DownloadAction() {
         super(tr("Download from OSM..."), "download", tr("Download map data from the OSM server."),
Index: /trunk/src/org/openstreetmap/josm/actions/NewAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/NewAction.java	(revision 6508)
+++ /trunk/src/org/openstreetmap/josm/actions/NewAction.java	(revision 6509)
@@ -13,6 +13,13 @@
 import org.openstreetmap.josm.tools.Shortcut;
 
+/**
+ * Creates a blank new OSM data layer.
+ * @since 169
+ */
 public class NewAction extends JosmAction {
 
+    /**
+     * Constructs a {@code NewAction}.
+     */
     public NewAction() {
         super(tr("New Layer"), "new", tr("Create a new map layer."),
Index: /trunk/src/org/openstreetmap/josm/data/Bounds.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 6508)
+++ /trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 6509)
@@ -276,6 +276,5 @@
      * @return Center of the bounding box.
      */
-    public LatLon getCenter()
-    {
+    public LatLon getCenter() {
         if (crosses180thMeridian()) {            
             double lat = (minLat + maxLat) / 2;
Index: /trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 6508)
+++ /trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 6509)
@@ -47,4 +47,5 @@
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.data.projection.Projections;
+import org.openstreetmap.josm.gui.download.DownloadDialog;
 import org.openstreetmap.josm.gui.help.Helpful;
 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
@@ -193,4 +194,7 @@
     private Polygon paintPoly = null;
 
+    /**
+     * Constructs a new {@code NavigatableComponent}.
+     */
     public NavigatableComponent() {
         setLayout(null);
@@ -202,9 +206,9 @@
 
     private EastNorth calculateDefaultCenter() {
-        Bounds b = Main.getProjection().getWorldBoundsLatLon();
-        double lat = (b.getMaxLat() + b.getMinLat())/2;
-        double lon = (b.getMaxLon() + b.getMinLon())/2;
-        // FIXME is it correct? b.getCenter() makes some adjustments... 
-        return Main.getProjection().latlon2eastNorth(new LatLon(lat, lon));
+        Bounds b = DownloadDialog.getSavedDownloadBounds();
+        if (b == null) {
+            b = Main.getProjection().getWorldBoundsLatLon();
+        }
+        return Main.getProjection().latlon2eastNorth(b.getCenter());
     }
 
@@ -412,4 +416,7 @@
         int width = getWidth()/2;
         int height = getHeight()/2;
+        if (width == 0 || height == 0) {
+            throw new IllegalStateException("Cannot zoom into undimensioned NavigatableComponent");
+        }
         LatLon l1 = new LatLon(b.getMinLat(), lon);
         LatLon l2 = new LatLon(b.getMaxLat(), lon);
Index: /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 6508)
+++ /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 6509)
@@ -307,6 +307,5 @@
     
     /**
-     * Remembers the current settings in the download dialog
-     *
+     * Remembers the current settings in the download dialog.
      */
     public void rememberSettings() {
@@ -320,4 +319,7 @@
     }
 
+    /**
+     * Restores the previous settings in the download dialog.
+     */
     public void restoreSettings() {
         cbDownloadOsmData.setSelected(Main.pref.getBoolean("download.osm", true));
@@ -339,16 +341,34 @@
             boundingBoxChanged(currentBounds,null);
         }
-        else if (!Main.pref.get("osm-download.bounds").isEmpty()) {
-            // read the bounding box from the preferences
+        else {
+            Bounds bounds = getSavedDownloadBounds();
+            if (bounds != null) {
+                currentBounds = bounds;
+                boundingBoxChanged(currentBounds, null);
+            }
+        }
+    }
+    
+    /**
+     * Returns the previously saved bounding box from preferences.
+     * @return The bounding box saved in preferences if any, {@code null} otherwise
+     * @since 6509
+     */
+    public static Bounds getSavedDownloadBounds() {
+        String value = Main.pref.get("osm-download.bounds");
+        if (!value.isEmpty()) {
             try {
-                currentBounds = new Bounds(Main.pref.get("osm-download.bounds"), ";");
-                boundingBoxChanged(currentBounds,null);
-            }
-            catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
+                return new Bounds(value, ";");
+            } catch (IllegalArgumentException e) {
+                Main.warn(e);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Determines if the dialog autorun is enabled in preferences.
+     * @return {@code true} if the download dialog must be open at startup, {@code false} otherwise
+     */
     public static boolean isAutorunEnabled() {
         return Main.pref.getBoolean("download.autorun",false);
@@ -362,5 +382,6 @@
 
     /**
-     * Replies the currently selected download area. May be null, if no download area is selected yet.
+     * Replies the currently selected download area.
+     * @return the currently selected download area. May be {@code null}, if no download area is selected yet.
      */
     public Bounds getSelectedDownloadArea() {
