Index: /trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java	(revision 1685)
+++ /trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java	(revision 1686)
@@ -19,4 +19,5 @@
 import javax.swing.JPanel;
 
+import org.openstreetmap.gui.jmapviewer.Coordinate;
 import org.openstreetmap.gui.jmapviewer.JMapViewer;
 import org.openstreetmap.gui.jmapviewer.MapMarkerDot;
@@ -84,6 +85,7 @@
             this.setTileSource(sources[2]);
         } else {
-            if (!mapStyle.equals("mapnik"))
+            if (!mapStyle.equals("mapnik")) {
                 Main.pref.put("slippy_map_chooser.mapstyle", "mapnik");
+            }
         }
     }
@@ -94,8 +96,9 @@
 
     public void setFileCacheEnabled(boolean enabled) {
-        if (enabled)
+        if (enabled) {
             setTileLoader(cachedLoader);
-        else
+        } else {
             setTileLoader(uncachedLoader);
+        }
     }
 
@@ -106,5 +109,5 @@
         slipyyMapTabPanel.add(this, BorderLayout.CENTER);
         String labelText = "<b>Zoom:</b> Mousewheel, double click or Ctrl + Up/Down "
-                + "<b>Move map:</b> Hold right mousebutton and move mouse or use cursor keys. <b>Select:</b> Click.";
+            + "<b>Move map:</b> Hold right mousebutton and move mouse or use cursor keys. <b>Select:</b> Click.";
         slipyyMapTabPanel.add(new JLabel("<html>" + tr(labelText) + "</html>"), BorderLayout.SOUTH);
         iGui.tabpane.add(slipyyMapTabPanel, tr("Slippy map"));
@@ -203,10 +206,10 @@
         iSelectionRectEnd = pEnd;
 
-        Point2D.Double l1 = getPosition(p_max);
-        Point2D.Double l2 = getPosition(p_min);
-        iGui.minlat = Math.min(l2.x, l1.x);
-        iGui.minlon = Math.min(l1.y, l2.y);
-        iGui.maxlat = Math.max(l2.x, l1.x);
-        iGui.maxlon = Math.max(l1.y, l2.y);
+        Coordinate l1 = getPosition(p_max);
+        Coordinate l2 = getPosition(p_min);
+        iGui.minlat = Math.min(l2.getLon(), l1.getLon());
+        iGui.minlon = Math.min(l1.getLat(), l2.getLat());
+        iGui.maxlat = Math.max(l2.getLon(), l1.getLon());
+        iGui.maxlon = Math.max(l1.getLat(), l2.getLat());
 
         iGui.boundingBoxChanged(this);
@@ -221,5 +224,5 @@
         if (iScreenSize == null) {
             Component c = iGui.getParent().getParent().getParent().getParent().getParent().getParent().getParent()
-                    .getParent().getParent();
+            .getParent().getParent();
             // remember the initial set screen dimensions
             iDownloadDialogDimension = c.getSize();
@@ -230,5 +233,5 @@
         // resize
         Component co = iGui.getParent().getParent().getParent().getParent().getParent().getParent().getParent()
-                .getParent().getParent();
+        .getParent().getParent();
         Dimension currentDimension = co.getSize();
 
