Ignore:
Timestamp:
2017-08-27T20:18:01+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12671

Location:
applications/editors/josm/plugins/openvisible
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openvisible/build.xml

    r32680 r33567  
    55    <property name="commit.message" value="Changed the constructor signature of the plugin main class; updated build.xml"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="10580"/>
     7    <property name="plugin.main.version" value="12671"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java

    r32463 r33567  
    2323import org.openstreetmap.josm.data.coor.LatLon;
    2424import org.openstreetmap.josm.data.osm.DataSet;
     25import org.openstreetmap.josm.gui.MainApplication;
    2526import org.openstreetmap.josm.gui.MapView;
     27import org.openstreetmap.josm.gui.io.importexport.GpxImporter;
     28import org.openstreetmap.josm.gui.io.importexport.OsmImporter;
    2629import org.openstreetmap.josm.gui.layer.GpxLayer;
    2730import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2831import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    2932import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    30 import org.openstreetmap.josm.io.GpxImporter;
    3133import org.openstreetmap.josm.io.GpxReader;
    3234import org.openstreetmap.josm.io.IllegalDataException;
    33 import org.openstreetmap.josm.io.OsmImporter;
    3435import org.openstreetmap.josm.io.OsmReader;
    3536import org.openstreetmap.josm.tools.Shortcut;
     
    5556     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
    5657     */
     58    @Override
    5759    public void actionPerformed(ActionEvent e) {
    58         if(Main.map == null || Main.map.mapView == null) {
     60        if(!MainApplication.isDisplayingMapView()) {
    5961            JOptionPane.showMessageDialog(Main.parent, tr("No view open - cannot determine boundaries!"));
    6062            return;
    6163        }
    62         MapView view = Main.map.mapView;
     64        MapView view = MainApplication.getMap().mapView;
    6365        Rectangle bounds = view.getBounds();
    6466        LatLon bottomLeft = view.getLatLon(bounds.x, bounds.y + bounds.height);
     
    109111            DataSet dataSet = OsmReader.parseDataSet(new FileInputStream(file), NullProgressMonitor.INSTANCE);
    110112            OsmDataLayer layer = new OsmDataLayer(dataSet, fn, file);
    111             Main.getLayerManager().addLayer(layer);
     113            MainApplication.getLayerManager().addLayer(layer);
    112114        }
    113115        else
     
    131133            r.getGpxData().storageFile = file;
    132134            GpxLayer gpxLayer = new GpxLayer(r.getGpxData(), fn);
    133             Main.getLayerManager().addLayer(gpxLayer);
    134             Main.getLayerManager().addLayer(new MarkerLayer(r.getGpxData(), tr("Markers from {0}", fn), file, gpxLayer));
     135            MainApplication.getLayerManager().addLayer(gpxLayer);
     136            MainApplication.getLayerManager().addLayer(new MarkerLayer(r.getGpxData(), tr("Markers from {0}", fn), file, gpxLayer));
    135137
    136138        } else {
  • applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisiblePlugin.java

    r29778 r33567  
    44package at.dallermassl.josm.plugin.openvisible;
    55
    6 import org.openstreetmap.josm.Main;
     6import org.openstreetmap.josm.gui.MainApplication;
    77import org.openstreetmap.josm.gui.MainMenu;
    88import org.openstreetmap.josm.plugins.Plugin;
     
    1717    public OpenVisiblePlugin(PluginInformation info) {
    1818        super(info);
    19         MainMenu.add(Main.main.menu.gpsMenu, new OpenVisibleAction());
     19        MainMenu.add(MainApplication.getMenu().gpsMenu, new OpenVisibleAction());
    2020    }
    2121
Note: See TracChangeset for help on using the changeset viewer.