Changeset 1686 in josm


Ignore:
Timestamp:
21.06.2009 18:29:16 (3 years ago)
Author:
Gubaer
Message:

fixed update in JMapViewer code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java

    r1677 r1686  
    1919import javax.swing.JPanel; 
    2020 
     21import org.openstreetmap.gui.jmapviewer.Coordinate; 
    2122import org.openstreetmap.gui.jmapviewer.JMapViewer; 
    2223import org.openstreetmap.gui.jmapviewer.MapMarkerDot; 
     
    8485            this.setTileSource(sources[2]); 
    8586        } else { 
    86             if (!mapStyle.equals("mapnik")) 
     87            if (!mapStyle.equals("mapnik")) { 
    8788                Main.pref.put("slippy_map_chooser.mapstyle", "mapnik"); 
     89            } 
    8890        } 
    8991    } 
     
    9496 
    9597    public void setFileCacheEnabled(boolean enabled) { 
    96         if (enabled) 
     98        if (enabled) { 
    9799            setTileLoader(cachedLoader); 
    98         else 
     100        } else { 
    99101            setTileLoader(uncachedLoader); 
     102        } 
    100103    } 
    101104 
     
    106109        slipyyMapTabPanel.add(this, BorderLayout.CENTER); 
    107110        String labelText = "<b>Zoom:</b> Mousewheel, double click or Ctrl + Up/Down " 
    108                 + "<b>Move map:</b> Hold right mousebutton and move mouse or use cursor keys. <b>Select:</b> Click."; 
     111            + "<b>Move map:</b> Hold right mousebutton and move mouse or use cursor keys. <b>Select:</b> Click."; 
    109112        slipyyMapTabPanel.add(new JLabel("<html>" + tr(labelText) + "</html>"), BorderLayout.SOUTH); 
    110113        iGui.tabpane.add(slipyyMapTabPanel, tr("Slippy map")); 
     
    203206        iSelectionRectEnd = pEnd; 
    204207 
    205         Point2D.Double l1 = getPosition(p_max); 
    206         Point2D.Double l2 = getPosition(p_min); 
    207         iGui.minlat = Math.min(l2.x, l1.x); 
    208         iGui.minlon = Math.min(l1.y, l2.y); 
    209         iGui.maxlat = Math.max(l2.x, l1.x); 
    210         iGui.maxlon = Math.max(l1.y, l2.y); 
     208        Coordinate l1 = getPosition(p_max); 
     209        Coordinate l2 = getPosition(p_min); 
     210        iGui.minlat = Math.min(l2.getLon(), l1.getLon()); 
     211        iGui.minlon = Math.min(l1.getLat(), l2.getLat()); 
     212        iGui.maxlat = Math.max(l2.getLon(), l1.getLon()); 
     213        iGui.maxlon = Math.max(l1.getLat(), l2.getLat()); 
    211214 
    212215        iGui.boundingBoxChanged(this); 
     
    221224        if (iScreenSize == null) { 
    222225            Component c = iGui.getParent().getParent().getParent().getParent().getParent().getParent().getParent() 
    223                     .getParent().getParent(); 
     226            .getParent().getParent(); 
    224227            // remember the initial set screen dimensions 
    225228            iDownloadDialogDimension = c.getSize(); 
     
    230233        // resize 
    231234        Component co = iGui.getParent().getParent().getParent().getParent().getParent().getParent().getParent() 
    232                 .getParent().getParent(); 
     235        .getParent().getParent(); 
    233236        Dimension currentDimension = co.getSize(); 
    234237 
Note: See TracChangeset for help on using the changeset viewer.