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()

File:
1 edited

Legend:

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

    r12620 r12630  
    3232import org.openstreetmap.josm.data.osm.NoteData.NoteDataUpdateListener;
    3333import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     34import org.openstreetmap.josm.gui.MainApplication;
    3435import org.openstreetmap.josm.gui.MapView;
    3536import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
     
    7374    @Override
    7475    public void hookUpMapView() {
    75         Main.map.mapView.addMouseListener(this);
     76        MainApplication.getMap().mapView.addMouseListener(this);
    7677    }
    7778
    7879    @Override
    7980    public synchronized void destroy() {
    80         Main.map.mapView.removeMouseListener(this);
     81        MainApplication.getMap().mapView.removeMouseListener(this);
    8182        noteData.removeNoteDataUpdateListener(this);
    8283        super.destroy();
     
    134135            int width = icon.getIconWidth();
    135136            int height = icon.getIconHeight();
    136             g.drawImage(icon.getImage(), p.x - (width / 2), p.y - height, Main.map.mapView);
     137            g.drawImage(icon.getImage(), p.x - (width / 2), p.y - height, MainApplication.getMap().mapView);
    137138        }
    138139        if (noteData.getSelectedNote() != null) {
     
    260261        Note closestNote = null;
    261262        for (Note note : noteData.getNotes()) {
    262             Point notePoint = Main.map.mapView.getPoint(note.getLatLon());
     263            Point notePoint = MainApplication.getMap().mapView.getPoint(note.getLatLon());
    263264            //move the note point to the center of the icon where users are most likely to click when selecting
    264265            notePoint.setLocation(notePoint.getX(), notePoint.getY() - iconHeight / 2);
Note: See TracChangeset for help on using the changeset viewer.