Ignore:
Timestamp:
2017-11-17T21:38:04+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12643

Location:
applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java

    r33342 r33837  
    3939    FakeMapView(MapView parent, double scale) {
    4040        // TODO: MapView constructor contains registering listeners and other code, that probably shouldn't be called in fake map view
    41         super(null, null, null);
     41        super(null, null);
    4242        this.parent = parent;
    4343        this.scale = scale;
  • applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java

    r33342 r33837  
    3333import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
    3434import org.openstreetmap.josm.data.gpx.WayPoint;
     35import org.openstreetmap.josm.gui.MainApplication;
    3536import org.openstreetmap.josm.gui.layer.GpxLayer;
    3637import org.openstreetmap.josm.gui.layer.Layer;
     
    6364
    6465        this.ground = ground;
    65         ground_view = new FakeMapView(Main.map.mapView, 0.0000001);
     66        ground_view = new FakeMapView(MainApplication.getMap().mapView, 0.0000001);
    6667
    6768        /* Retrieve start position */
  • applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java

    r33342 r33837  
    1111import javax.swing.JMenuItem;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.actions.JosmAction;
     14import org.openstreetmap.josm.gui.MainApplication;
    1515import org.openstreetmap.josm.gui.MapFrame;
    1616import org.openstreetmap.josm.gui.layer.Layer;
     
    3232        driveAction.updateEnabledState();
    3333
    34         JMenu toolsMenu = Main.main.menu.toolsMenu;
     34        JMenu toolsMenu = MainApplication.getMenu().toolsMenu;
    3535        toolsMenu.addSeparator();
    3636        toolsMenu.add(new JMenuItem(driveAction));
     
    105105    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
    106106        if (oldFrame != null) {
    107             Main.getLayerManager().removeLayerChangeListener(this);
    108             Main.getLayerManager().removeActiveLayerChangeListener(this);
     107            MainApplication.getLayerManager().removeLayerChangeListener(this);
     108            MainApplication.getLayerManager().removeActiveLayerChangeListener(this);
    109109        }
    110110
     
    113113
    114114        if (newFrame != null) {
    115             Main.getLayerManager().addLayerChangeListener(this);
    116             Main.getLayerManager().addActiveLayerChangeListener(this);
     115            MainApplication.getLayerManager().addLayerChangeListener(this);
     116            MainApplication.getLayerManager().addActiveLayerChangeListener(this);
    117117        }
    118118    }
     
    120120    @Override
    121121    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
    122         driveAction.currentLayer = Main.getLayerManager().getActiveLayer();
     122        driveAction.currentLayer = MainApplication.getLayerManager().getActiveLayer();
    123123        driveAction.updateEnabledState();
    124124    }
Note: See TracChangeset for help on using the changeset viewer.