Ignore:
Timestamp:
2013-04-23T13:17:15+02:00 (12 years ago)
Author:
donvip
Message:

[josm_plugins] Do not use Main.map.mapView instead of mv parameter in paint() methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java

    r28559 r29531  
    232232
    233233            // Position image at the right graphical place
    234             EastNorth center = Main.map.mapView.getCenter();
    235             EastNorth leftop = Main.map.mapView.getEastNorth( 0, 0 );
     234            EastNorth center = mv.getCenter();
     235            EastNorth leftop = mv.getEastNorth( 0, 0 );
    236236            // Number of pixels for one unit in east north space.
    237237            // This is the same in x- and y- direction.
    238             double pixel_per_en = ( Main.map.mapView.getWidth() / 2.0 ) / ( center.east() - leftop.east() );
     238            double pixel_per_en = ( mv.getWidth() / 2.0 ) / ( center.east() - leftop.east() );
    239239
    240240            //     This is now the offset in screen pixels
     
    258258
    259259            // Draw additional rectangle for the active pic layer
    260             if ( Main.map.mapView.getActiveLayer() == this ) {
     260            if ( mv.getActiveLayer() == this ) {
    261261                g.setColor( new Color( 0xFF0000 ) );
    262262                g.drawRect(
Note: See TracChangeset for help on using the changeset viewer.