Changeset 33920 in osm for applications/editors/josm


Ignore:
Timestamp:
2017-11-26T15:47:40+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12643

Location:
applications/editors/josm/plugins/seachartedit
Files:
4 edited

Legend:

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

    r32680 r33920  
    44    <property name="commit.message" value="New release"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="10580"/>
     6    <property name="plugin.main.version" value="12643"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/seachartedit/src/panels/PanelS57.java

    r33030 r33920  
    2727import org.openstreetmap.josm.data.coor.LatLon;
    2828import org.openstreetmap.josm.data.osm.DataSet;
     29import org.openstreetmap.josm.data.osm.DataSet.UploadPolicy;
    2930import org.openstreetmap.josm.data.osm.Node;
    3031import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    3334import org.openstreetmap.josm.data.osm.RelationMember;
    3435import org.openstreetmap.josm.data.osm.Way;
     36import org.openstreetmap.josm.gui.MainApplication;
    3537import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    3638
     
    7274        if (returnVal == JFileChooser.APPROVE_OPTION) {
    7375            Main.pref.put("smed2plugin.typesfile", ifc.getSelectedFile().getPath());
    74             Scanner tin = new Scanner(new FileInputStream(ifc.getSelectedFile()));
     76            Scanner tin = new Scanner(new FileInputStream(ifc.getSelectedFile()), "UTF-8");
    7577            while (tin.hasNext()) {
    7678                Obj type = S57obj.enumType(tin.next());
     
    8688
    8789        DataSet data = new DataSet();
    88         data.setUploadDiscouraged(true);
     90        data.setUploadPolicy(UploadPolicy.DISCOURAGED);
    8991
    9092        for (long id : map.index.keySet()) {
     
    201203
    202204        OsmDataLayer layer = new OsmDataLayer(data, "S-57 Import", null);
    203         Main.getLayerManager().addLayer(layer);
    204         Main.map.mapView.zoomTo(new Bounds(Math.toDegrees(map.bounds.minlat), Math.toDegrees(map.bounds.minlon),
     205        MainApplication.getLayerManager().addLayer(layer);
     206        MainApplication.getMap().mapView.zoomTo(new Bounds(Math.toDegrees(map.bounds.minlat), Math.toDegrees(map.bounds.minlon),
    205207                                           Math.toDegrees(map.bounds.maxlat), Math.toDegrees(map.bounds.maxlon)));
    206208        PanelMain.setStatus("Import done", Color.green);
  • applications/editors/josm/plugins/seachartedit/src/scedit/SCedit.java

    r33030 r33920  
    1010package scedit;
    1111
    12 import org.openstreetmap.josm.Main;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313import org.openstreetmap.josm.gui.MainMenu;
    1414import org.openstreetmap.josm.plugins.Plugin;
     
    1919    public SCedit(PluginInformation info) {
    2020        super(info);
    21         MainMenu.add(Main.main.menu.toolsMenu, new SCeditAction());
     21        MainMenu.add(MainApplication.getMenu().toolsMenu, new SCeditAction());
    2222    }
    2323}
  • applications/editors/josm/plugins/seachartedit/src/scedit/SCeditAction.java

    r33030 r33920  
    2222import javax.swing.WindowConstants;
    2323
    24 import org.openstreetmap.josm.Main;
    2524import org.openstreetmap.josm.actions.JosmAction;
    2625import org.openstreetmap.josm.data.Bounds;
     
    152151        showFrame.setVisible(false);
    153152
    154         Main.getLayerManager().addAndFireActiveLayerChangeListener(this);
     153        getLayerManager().addAndFireActiveLayerChangeListener(this);
    155154        DataSet.addSelectionListener(this);
    156155    }
     
    158157    public void closeDialog() {
    159158        if (isOpen) {
    160                 Main.getLayerManager().removeActiveLayerChangeListener(this);
     159                getLayerManager().removeActiveLayerChangeListener(this);
    161160            editFrame.setVisible(false);
    162161            editFrame.dispose();
     
    172171            e.getPreviousEditLayer().data.removeDataSetListener(dataSetListener);
    173172        }
    174         OsmDataLayer newLayer = Main.getLayerManager().getEditLayer();
     173        OsmDataLayer newLayer = getLayerManager().getEditLayer();
    175174        if (newLayer != null) {
    176175            newLayer.data.addDataSetListener(dataSetListener);
Note: See TracChangeset for help on using the changeset viewer.