Ignore:
Timestamp:
27.10.2009 01:21:32 (3 years ago)
Author:
Gubaer
Message:

Cleanup in download logic (less global, more encapsulation)

File:
1 edited

Legend:

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

    r2017 r2327  
    3232 
    3333import org.openstreetmap.josm.Main; 
     34import org.openstreetmap.josm.data.Bounds; 
     35import org.openstreetmap.josm.data.coor.LatLon; 
    3436import org.openstreetmap.josm.tools.GBC; 
    3537import org.xml.sax.Attributes; 
     
    224226        scrollPane.setPreferredSize(new Dimension(200,200)); 
    225227        panel.add(scrollPane, c); 
    226         gui.tabpane.add(panel, tr("Places")); 
     228        gui.addDownloadAreaSelector(panel, tr("Places")); 
    227229 
    228230        scrollPane.setPreferredSize(scrollPane.getPreferredSize()); 
     
    298300                { 
    299301                    double size = 180.0 / Math.pow(2, r.zoom); 
    300                     gui.minlat = r.lat - size / 2; 
    301                     gui.maxlat = r.lat + size / 2; 
    302                     gui.minlon = r.lon - size; 
    303                     gui.maxlon = r.lon + size; 
     302                    Bounds b = new Bounds( 
     303                        new LatLon( 
     304                            r.lat - size / 2, 
     305                            r.lat + size / 2 
     306                         ), 
     307                         new LatLon( 
     308                            r.lon - size, 
     309                            r.lon + size 
     310                         ) 
     311                    ); 
    304312                    updatingSelf = true; 
    305                     gui.boundingBoxChanged(null); 
     313                    gui.boundingBoxChanged(b,null); 
    306314                    updatingSelf = false; 
    307315                } 
Note: See TracChangeset for help on using the changeset viewer.