Ignore:
Timestamp:
2017-08-24T00:15:51+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.map and Main.isDisplayingMapView(). Replacements: gui.MainApplication.getMap() / gui.MainApplication.isDisplayingMapView()

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java

    r10453 r12630  
    1414import org.openstreetmap.josm.Main;
    1515import org.openstreetmap.josm.actions.JosmAction;
     16import org.openstreetmap.josm.gui.MainApplication;
    1617import org.openstreetmap.josm.gui.dialogs.MapPaintDialog;
    1718import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    6667        @Override
    6768        public void updateEnabledState() {
    68             setEnabled(Main.isDisplayingMapView() && (Main.getLayerManager().getEditLayer() != null || mapHasGpxorMarkerLayer()));
     69            setEnabled(MainApplication.isDisplayingMapView() && (Main.getLayerManager().getEditLayer() != null || mapHasGpxorMarkerLayer()));
    6970        }
    7071
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java

    r12303 r12630  
    1212import javax.swing.ImageIcon;
    1313
    14 import org.openstreetmap.josm.Main;
     14import org.openstreetmap.josm.gui.MainApplication;
     15import org.openstreetmap.josm.gui.MapView;
    1516import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    1617import org.openstreetmap.josm.gui.mappaint.StyleSource;
     
    149150                        if (temporary) {
    150151                            disabledImgCache = null;
    151                             Main.map.mapView.preferenceChanged(null); // otherwise repaint is ignored, because layer hasn't changed
    152                             Main.map.mapView.repaint();
     152                            MapView mapView = MainApplication.getMap().mapView;
     153                            mapView.preferenceChanged(null); // otherwise repaint is ignored, because layer hasn't changed
     154                            mapView.repaint();
    153155                        }
    154156                        temporary = false;
Note: See TracChangeset for help on using the changeset viewer.