Changeset 29665 in osm
- Timestamp:
- 2013-06-18T21:16:28+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/tabular/SpreadSheetReader.java
r29653 r29665 35 35 import org.openstreetmap.josm.data.projection.Projection; 36 36 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 37 import org.openstreetmap.josm.gui.util.GuiHelper; 37 38 import org.openstreetmap.josm.io.AbstractReader; 38 39 import org.openstreetmap.josm.plugins.opendata.core.OdConstants; … … 88 89 } 89 90 return col; 91 } 92 93 private class ChooserLauncher implements Runnable { 94 95 public Projection proj = null; 96 private final ProgressMonitor progressMonitor; 97 98 public ChooserLauncher(ProgressMonitor progressMonitor) { 99 this.progressMonitor = progressMonitor; 100 } 101 102 @Override public void run() { 103 ProjectionChooser dialog = (ProjectionChooser) new ProjectionChooser(progressMonitor.getWindowParent()).showDialog(); 104 if (dialog.getValue() == 1) { 105 proj = dialog.getProjection(); 106 } 107 } 90 108 } 91 109 … … 141 159 if (!handlerOK) { 142 160 // TODO: filter proposed projections with min/max values ? 143 ProjectionChooser dialog = (ProjectionChooser) new ProjectionChooser(progressMonitor.getWindowParent()).showDialog(); 144 if (dialog.getValue() != 1) { 161 ChooserLauncher launcher = new ChooserLauncher(progressMonitor); 162 GuiHelper.runInEDTAndWait(launcher); 163 if (launcher.proj == null) { 145 164 return null; // User clicked Cancel 146 165 } 147 Projection proj = dialog.getProjection();148 166 for (CoordinateColumns c : columns) { 149 c.proj = proj;167 c.proj = launcher.proj; 150 168 } 151 169 }
Note:
See TracChangeset
for help on using the changeset viewer.