Changeset 33920 in osm for applications/editors/josm
- Timestamp:
- 2017-11-26T15:47:40+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/seachartedit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachartedit/build.xml
r32680 r33920 4 4 <property name="commit.message" value="New release"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 0580"/>6 <property name="plugin.main.version" value="12643"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/seachartedit/src/panels/PanelS57.java
r33030 r33920 27 27 import org.openstreetmap.josm.data.coor.LatLon; 28 28 import org.openstreetmap.josm.data.osm.DataSet; 29 import org.openstreetmap.josm.data.osm.DataSet.UploadPolicy; 29 30 import org.openstreetmap.josm.data.osm.Node; 30 31 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 33 34 import org.openstreetmap.josm.data.osm.RelationMember; 34 35 import org.openstreetmap.josm.data.osm.Way; 36 import org.openstreetmap.josm.gui.MainApplication; 35 37 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 36 38 … … 72 74 if (returnVal == JFileChooser.APPROVE_OPTION) { 73 75 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"); 75 77 while (tin.hasNext()) { 76 78 Obj type = S57obj.enumType(tin.next()); … … 86 88 87 89 DataSet data = new DataSet(); 88 data.setUpload Discouraged(true);90 data.setUploadPolicy(UploadPolicy.DISCOURAGED); 89 91 90 92 for (long id : map.index.keySet()) { … … 201 203 202 204 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), 205 207 Math.toDegrees(map.bounds.maxlat), Math.toDegrees(map.bounds.maxlon))); 206 208 PanelMain.setStatus("Import done", Color.green); -
applications/editors/josm/plugins/seachartedit/src/scedit/SCedit.java
r33030 r33920 10 10 package scedit; 11 11 12 import org.openstreetmap.josm. Main;12 import org.openstreetmap.josm.gui.MainApplication; 13 13 import org.openstreetmap.josm.gui.MainMenu; 14 14 import org.openstreetmap.josm.plugins.Plugin; … … 19 19 public SCedit(PluginInformation info) { 20 20 super(info); 21 MainMenu.add(Main .main.menu.toolsMenu, new SCeditAction());21 MainMenu.add(MainApplication.getMenu().toolsMenu, new SCeditAction()); 22 22 } 23 23 } -
applications/editors/josm/plugins/seachartedit/src/scedit/SCeditAction.java
r33030 r33920 22 22 import javax.swing.WindowConstants; 23 23 24 import org.openstreetmap.josm.Main;25 24 import org.openstreetmap.josm.actions.JosmAction; 26 25 import org.openstreetmap.josm.data.Bounds; … … 152 151 showFrame.setVisible(false); 153 152 154 Main.getLayerManager().addAndFireActiveLayerChangeListener(this);153 getLayerManager().addAndFireActiveLayerChangeListener(this); 155 154 DataSet.addSelectionListener(this); 156 155 } … … 158 157 public void closeDialog() { 159 158 if (isOpen) { 160 Main.getLayerManager().removeActiveLayerChangeListener(this);159 getLayerManager().removeActiveLayerChangeListener(this); 161 160 editFrame.setVisible(false); 162 161 editFrame.dispose(); … … 172 171 e.getPreviousEditLayer().data.removeDataSetListener(dataSetListener); 173 172 } 174 OsmDataLayer newLayer = Main.getLayerManager().getEditLayer();173 OsmDataLayer newLayer = getLayerManager().getEditLayer(); 175 174 if (newLayer != null) { 176 175 newLayer.data.addDataSetListener(dataSetListener);
Note:
See TracChangeset
for help on using the changeset viewer.