Changeset 33564 in osm
- Timestamp:
- 2017-08-27T19:25:32+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java
r30737 r33564 30 30 import org.openstreetmap.josm.data.projection.Projection; 31 31 import org.openstreetmap.josm.data.projection.Projections; 32 import org.openstreetmap.josm.gui.MainApplication; 32 33 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 33 34 import org.openstreetmap.josm.io.OsmTransferException; … … 159 160 @Override 160 161 protected void realRun() throws IOException, OsmTransferException { 161 LatLon center = Main.getProjection().eastNorth2latlon(Main .map.mapView.getCenter());162 LatLon center = Main.getProjection().eastNorth2latlon(MainApplication.getMap().mapView.getCenter()); 162 163 scale = Settings.getScaleNumerator() / Settings.getScaleDivisor() / Math.cos(Math.toRadians(center.lat())); 163 164 this.center = projection.latlon2eastNorth(center); … … 191 192 cmds.add(new AddCommand(w)); 192 193 } 193 Main .main.undoRedo.add(new SequenceCommand("Import primitives", cmds));194 MainApplication.undoRedo.add(new SequenceCommand("Import primitives", cmds)); 194 195 } 195 196 -
applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/SvgImporter.java
r33557 r33564 11 11 import org.openstreetmap.josm.Main; 12 12 import org.openstreetmap.josm.actions.ExtensionFileFilter; 13 import org.openstreetmap.josm.gui.MainApplication; 13 14 import org.openstreetmap.josm.gui.io.importexport.FileImporter; 14 15 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 32 33 @Override 33 34 public void importData(List<File> files, ProgressMonitor progressMonitor) throws IOException, IllegalDataException { 34 if (Main .getLayerManager().getEditLayer() == null) {35 if (MainApplication.getLayerManager().getEditLayer() == null) { 35 36 JOptionPane.showMessageDialog(Main.parent, tr("Please open or create data layer before importing")); 36 37 return; … … 39 40 if (dlg.getValue() != 1) return; 40 41 dlg.saveSettings(); 41 Main .worker.submit(new SvgImportTask(files));42 MainApplication.worker.submit(new SvgImportTask(files)); 42 43 } 43 44 }
Note:
See TracChangeset
for help on using the changeset viewer.