Ignore:
Timestamp:
2009-07-09T23:41:51+02:00 (15 years ago)
Author:
guggis
Message:

updated for core r1758 after rework of projection handling and of editor layer access

Location:
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JoinAreasAction.java

    r16162 r16419  
    8888        }
    8989
     90        @Override
    9091        public boolean equals(Object other) {
    9192            if (!(other instanceof RelationRole)) return false;
     
    119120
    120121        LinkedList<Bounds> bounds = new LinkedList<Bounds>();
    121         OsmDataLayer dataLayer = Main.main.editLayer();
     122        OsmDataLayer dataLayer = Main.map.mapView.getEditLayer();
    122123        for (DataSource ds : dataLayer.data.dataSources) {
    123124            if (ds.bounds != null)
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java

    r16290 r16419  
    2020import org.openstreetmap.josm.actions.JosmAction;
    2121import org.openstreetmap.josm.data.Bounds;
     22import org.openstreetmap.josm.data.ProjectionBounds;
    2223import org.openstreetmap.josm.data.coor.LatLon;
    2324import org.openstreetmap.josm.gui.NavigatableComponent;
     
    166167        double sizex = scale * Main.map.mapView.getWidth();
    167168        double sizey = scale * Main.map.mapView.getHeight();
    168         for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2)
    169             if (sizex > NavigatableComponent.world.east() || sizey > NavigatableComponent.world.north())
     169        ProjectionBounds b = Main.proj.getWorldBounds();
     170        for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2) {               
     171            if (sizex > b.max.east() || sizey > b.max.north())
    170172                return zoom;
     173        }
    171174        return 32;
    172175    }
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/SimplifyWayAction.java

    r16162 r16419  
    4040        int ways = 0;
    4141        LinkedList<Bounds> bounds = new LinkedList<Bounds>();
    42         OsmDataLayer dataLayer = Main.main.editLayer();
     42        OsmDataLayer dataLayer = Main.map.mapView.getEditLayer();
    4343        for (DataSource ds : dataLayer.data.dataSources) {
    4444            if (ds.bounds != null)
Note: See TracChangeset for help on using the changeset viewer.