Changeset 4244 in josm for trunk/src/org
- Timestamp:
- 2011-07-14T19:29:57+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r4126 r4244 212 212 scaler.setLocation(10,30); 213 213 214 new MapMover(MapView.this, contentPane); 214 215 OsmDataLayer layer = getEditLayer(); 215 216 if (layer != null) { … … 221 222 AutoScaleAction.autoScale("layer"); 222 223 } 223 224 new MapMover(MapView.this, contentPane);225 224 } 226 225 }); -
trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
r3501 r4244 9 9 10 10 import javax.swing.JOptionPane; 11 import javax.swing.SwingUtilities; 11 12 12 13 import org.openstreetmap.josm.Main; … … 26 27 27 28 @Override public void importData(File file, ProgressMonitor progressMonitor) throws IOException { 28 String fn = file.getName();29 NmeaReader r = new NmeaReader(new FileInputStream(file), file.getAbsoluteFile().getParentFile());29 final String fn = file.getName(); 30 final NmeaReader r = new NmeaReader(new FileInputStream(file), file.getAbsoluteFile().getParentFile()); 30 31 if (r.getNumberOfCoordinates() > 0) { 31 32 r.data.storageFile = file; 32 GpxLayer gpxLayer = new GpxLayer(r.data, fn, true); 33 Main.main.addLayer(gpxLayer); 34 if (Main.pref.getBoolean("marker.makeautomarkers", true)) { 35 MarkerLayer ml = new MarkerLayer(r.data, tr("Markers from {0}", fn), file, gpxLayer); 36 if (ml.data.size() > 0) { 37 Main.main.addLayer(ml); 33 final GpxLayer gpxLayer = new GpxLayer(r.data, fn, true); 34 final File fileFinal = file; 35 36 Runnable uiStuff = new Runnable() { 37 public void run() { 38 Main.main.addLayer(gpxLayer); 39 if (Main.pref.getBoolean("marker.makeautomarkers", true)) { 40 MarkerLayer ml = new MarkerLayer(r.data, tr("Markers from {0}", fn), fileFinal, gpxLayer); 41 if (ml.data.size() > 0) { 42 Main.main.addLayer(ml); 43 } 44 } 38 45 } 46 }; 47 if (SwingUtilities.isEventDispatchThread()) { 48 uiStuff.run(); 49 } else { 50 SwingUtilities.invokeLater(uiStuff); 39 51 } 40 52 }
Note:
See TracChangeset
for help on using the changeset viewer.