Ignore:
Timestamp:
2009-07-22T20:33:41+02:00 (15 years ago)
Author:
stoecker
Message:

some projection and zoom cleanups - projection classes still need better handling of outside-world coordinates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r1808 r1823  
    196196     */
    197197    @Override public void paint(final Graphics g, final MapView mv) {
    198         boolean active = Main.map.mapView.getActiveLayer() == this;
     198        boolean active = mv.getActiveLayer() == this;
    199199        boolean inactive = !active && Main.pref.getBoolean("draw.data.inactive_color", true);
    200         boolean virtual = !inactive && Main.map.mapView.isVirtualNodesEnabled();
     200        boolean virtual = !inactive && mv.isVirtualNodesEnabled();
    201201
    202202        // draw the hatched area for non-downloaded region. only draw if we're the active
     
    204204        if (active && Main.pref.getBoolean("draw.data.downloaded_area", true) && !data.dataSources.isEmpty()) {
    205205            // initialize area with current viewport
    206             Rectangle b = Main.map.mapView.getBounds();
     206            Rectangle b = mv.getBounds();
    207207            // on some platforms viewport bounds seem to be offset from the left,
    208208            // over-grow it just to be sure
     
    213213            for (DataSource src : data.dataSources) {
    214214                if (src.bounds != null && !src.bounds.min.equals(src.bounds.max)) {
    215                     EastNorth en1 = Main.proj.latlon2eastNorth(src.bounds.min);
    216                     EastNorth en2 = Main.proj.latlon2eastNorth(src.bounds.max);
     215                    EastNorth en1 = mv.getProjection().latlon2eastNorth(src.bounds.min);
     216                    EastNorth en2 = mv.getProjection().latlon2eastNorth(src.bounds.max);
    217217                    Point p1 = mv.getPoint(en1);
    218218                    Point p2 = mv.getPoint(en2);
     
    536536    /**
    537537     * replies the set of conflicts currently managed in this layer
    538      * 
     538     *
    539539     * @return the set of conflicts currently managed in this layer
    540540     */
Note: See TracChangeset for help on using the changeset viewer.