Changeset 2146 in josm
- Timestamp:
- 2009-09-16T17:50:07+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r2105 r2146 81 81 private boolean isLocalFile; 82 82 83 private class Markers { 84 public boolean timedMarkersOmitted = false; 85 public boolean untimedMarkersOmitted = false; 86 } 87 83 88 public GpxLayer(GpxData d) { 84 89 super((String) d.attr.get("name")); … … 261 266 double firstStartTime = sel[0].lastModified() / 1000.0 /* ms -> seconds */ 262 267 - AudioUtil.getCalibratedDuration(sel[0]); 268 269 Markers m = new Markers(); 263 270 for (int i = 0; i < sel.length; i++) { 264 importAudio(sel[i], ml, firstStartTime );271 importAudio(sel[i], ml, firstStartTime, m); 265 272 } 266 273 } … … 949 956 * a single marker at the beginning of the track 950 957 * @param wavFile : the file to be associated with the markers in the new marker layer 958 * @param markers : keeps track of warning messages to avoid repeated warnings 951 959 */ 952 private void importAudio(File wavFile, MarkerLayer ml, double firstStartTime ) {960 private void importAudio(File wavFile, MarkerLayer ml, double firstStartTime, Markers markers) { 953 961 String uri = "file:".concat(wavFile.getAbsolutePath()); 954 962 Collection<WayPoint> waypoints = new ArrayList<WayPoint>(); … … 1151 1159 } 1152 1160 1153 if (timedMarkersOmitted ) {1161 if (timedMarkersOmitted && !markers.timedMarkersOmitted) { 1154 1162 JOptionPane 1155 1163 .showMessageDialog( 1156 1164 Main.parent, 1157 1165 tr("Some waypoints with timestamps from before the start of the track or after the end were omitted or moved to the start.")); 1158 } 1159 if (untimedMarkersOmitted) { 1166 markers.timedMarkersOmitted = timedMarkersOmitted; 1167 } 1168 if (untimedMarkersOmitted && !markers.untimedMarkersOmitted) { 1160 1169 JOptionPane 1161 1170 .showMessageDialog( 1162 1171 Main.parent, 1163 1172 tr("Some waypoints which were too far from the track to sensibly estimate their time were omitted.")); 1173 markers.untimedMarkersOmitted = untimedMarkersOmitted; 1164 1174 } 1165 1175 }
Note:
See TracChangeset
for help on using the changeset viewer.