Changeset 547 in josm
- Timestamp:
- 2008-02-18T18:27:12+01:00 (17 years ago)
- Location:
- trunk
- Files:
-
- 16 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r529 r547 41 41 import org.openstreetmap.josm.actions.UnselectAllAction; 42 42 import org.openstreetmap.josm.actions.UploadAction; 43 import org.openstreetmap.josm.actions.audio.AudioBackAction; 44 import org.openstreetmap.josm.actions.audio.AudioFwdAction; 45 import org.openstreetmap.josm.actions.audio.AudioNextAction; 46 import org.openstreetmap.josm.actions.audio.AudioPlayPauseAction; 47 import org.openstreetmap.josm.actions.audio.AudioPrevAction; 43 48 import org.openstreetmap.josm.actions.search.SearchAction; 44 49 import org.openstreetmap.josm.data.DataSetChecker; … … 87 92 public final JosmAction joinNodeWay = new JoinNodeWayAction(); 88 93 94 /* Audio menu */ 95 public final JosmAction audioPlayPause = new AudioPlayPauseAction(); 96 public final JosmAction audioNext = new AudioNextAction(); 97 public final JosmAction audioPrev = new AudioPrevAction(); 98 public final JosmAction audioFwd = new AudioFwdAction(); 99 public final JosmAction audioBack = new AudioBackAction(); 100 89 101 /* Help menu */ 90 102 public final HelpAction help = new HelpAction(); … … 95 107 public final JMenu viewMenu = new JMenu(tr("View")); 96 108 public final JMenu toolsMenu = new JMenu(tr("Tools")); 109 public final JMenu audioMenu = new JMenu(tr("Audio")); 97 110 public final JMenu presetsMenu = new JMenu(tr("Presets")); 98 111 public final JMenu helpMenu = new JMenu(tr("Help")); … … 193 206 add(toolsMenu); 194 207 208 if (! Main.pref.getBoolean("audio.menuinvisible")) { 209 audioMenu.setMnemonic('A'); 210 current = audioMenu.add(audioPlayPause); 211 current.setAccelerator(audioPlayPause.shortCut); 212 current = audioMenu.add(audioNext); 213 current.setAccelerator(audioNext.shortCut); 214 current = audioMenu.add(audioPrev); 215 current.setAccelerator(audioPrev.shortCut); 216 current = audioMenu.add(audioFwd); 217 current.setAccelerator(audioFwd.shortCut); 218 current = audioMenu.add(audioBack); 219 current.setAccelerator(audioBack.shortCut); 220 add(audioMenu); 221 } 222 195 223 add(presetsMenu); 196 224 presetsMenu.setMnemonic('P'); -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r512 r547 57 57 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 58 58 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 59 import org.openstreetmap.josm.gui.layer.markerlayer.Marker; 60 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 59 61 import org.openstreetmap.josm.tools.ColorHelper; 60 62 import org.openstreetmap.josm.tools.DontShowAgainInfo; … … 135 137 }); 136 138 139 JMenuItem markersFromNamedTrackpoints = new JMenuItem(tr("Markers From Named Points"), ImageProvider.get("addmarkers")); 140 markersFromNamedTrackpoints.addActionListener(new ActionListener() { 141 public void actionPerformed(ActionEvent e) { 142 /* 143 public Collection<GpxTrack> tracks = new LinkedList<GpxTrack>(); 144 public Collection<Collection<WayPoint>> trackSegs 145 = new LinkedList<Collection<WayPoint>>(); 146 */ 147 GpxData namedTrackPoints = new GpxData(); 148 for (GpxTrack track : data.tracks) 149 for (Collection<WayPoint> seg : track.trackSegs) 150 for (WayPoint point : seg) 151 if (point.attr.containsKey("name") || point.attr.containsKey("desc")) 152 namedTrackPoints.waypoints.add(point); 153 154 MarkerLayer ml = new MarkerLayer(namedTrackPoints, tr("Named Trackpoints from {0}", name), associatedFile); 155 if (ml.data.size() > 0) { 156 Main.main.addLayer(ml); 157 } 158 } 159 }); 160 137 161 JMenuItem tagimage = new JMenuItem(tr("Import images"), ImageProvider.get("tagimages")); 138 162 tagimage.addActionListener(new ActionListener() { … … 192 216 line, 193 217 tagimage, 218 markersFromNamedTrackpoints, 194 219 new JMenuItem(new ConvertToDataLayerAction()), 195 220 new JSeparator(), -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java
r298 r547 17 17 import org.openstreetmap.josm.Main; 18 18 import org.openstreetmap.josm.data.coor.LatLon; 19 import org.openstreetmap.josm.tools.AudioPlayer; 19 20 20 21 /** … … 27 28 28 29 private URL audioUrl; 30 private double syncOffset; 31 private static AudioMarker recentlyPlayedMarker = null; 29 32 30 33 /** … … 32 35 * one or return <code>null</code>. 33 36 */ 34 public static AudioMarker create(LatLon ll, String url) {37 public static AudioMarker create(LatLon ll, String text, String url, double offset) { 35 38 try { 36 return new AudioMarker(ll, new URL(url));39 return new AudioMarker(ll, text, new URL(url), offset); 37 40 } catch (Exception ex) { 38 41 return null; … … 40 43 } 41 44 42 private AudioMarker(LatLon ll, URL audioUrl) {43 super(ll, "speech.png");45 private AudioMarker(LatLon ll, String text, URL audioUrl, double offset) { 46 super(ll, text, "speech.png", offset); 44 47 this.audioUrl = audioUrl; 48 this.syncOffset = 0.0; 45 49 } 46 50 47 51 @Override public void actionPerformed(ActionEvent ev) { 48 AudioInputStream audioInputStream = null; 49 try { 50 audioInputStream = AudioSystem.getAudioInputStream(audioUrl); 51 } catch (Exception e) { 52 audioMalfunction(e); 53 return; 54 } 55 AudioFormat audioFormat = audioInputStream.getFormat(); 56 SourceDataLine line = null; 57 DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat); 58 try { 59 line = (SourceDataLine) AudioSystem.getLine(info); 60 line.open(audioFormat); 61 } catch (Exception e) { 62 audioMalfunction(e); 63 return; 64 } 65 line.start(); 66 67 int nBytesRead = 0; 68 byte[] abData = new byte[16384]; 69 while (nBytesRead != -1) { 70 try { 71 nBytesRead = audioInputStream.read(abData, 0, abData.length); 72 } catch (IOException e) { 73 audioMalfunction(e); 74 return; 75 } 76 if (nBytesRead >= 0) { 77 /* int nBytesWritten = */ line.write(abData, 0, nBytesRead); 78 } 79 } 80 line.drain(); 81 line.close(); 52 play(); 82 53 } 83 54 84 void audioMalfunction(Exception ex) { 85 JOptionPane.showMessageDialog(Main.parent, 86 "<html><b>" + 87 tr("There was an error while trying to play the sound file for this marker.") + 88 "</b><br>" + ex.getClass().getName() + ":<br><i>" + ex.getMessage() + "</i></html>", 89 tr("Error playing sound"), JOptionPane.ERROR_MESSAGE); 55 public static AudioMarker recentlyPlayedMarker() { 56 return recentlyPlayedMarker; 57 } 58 59 public URL url() { 60 return audioUrl; 61 } 62 63 /** 64 * Starts playing the audio associated with the marker: used in response to pressing 65 * the marker as well as indirectly 66 * 67 */ 68 public void play() { 69 try { 70 AudioPlayer.play(audioUrl, offset + syncOffset); 71 recentlyPlayedMarker = this; 72 } catch (Exception e) { 73 AudioPlayer.audioMalfunction(e); 74 } 75 } 76 77 public void adjustOffset(double adjustment) { 78 syncOffset = adjustment; // added to offset may turn out negative, but that's ok 90 79 } 91 80 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ButtonMarker.java
r298 r547 14 14 import org.openstreetmap.josm.data.coor.LatLon; 15 15 import org.openstreetmap.josm.gui.MapView; 16 import org.openstreetmap.josm.gui.layer.Layer; 16 17 17 18 /** … … 25 26 private Rectangle buttonRectangle; 26 27 27 public ButtonMarker(LatLon ll, String buttonImage) { 28 super(ll, null, buttonImage); 28 public ButtonMarker(LatLon ll, String buttonImage, double offset) { 29 super(ll, null, buttonImage, offset); 30 buttonRectangle = new Rectangle(0, 0, symbol.getIconWidth(), symbol.getIconHeight()); 31 } 32 33 public ButtonMarker(LatLon ll, String text, String buttonImage, double offset) { 34 super(ll, text, buttonImage, offset); 29 35 buttonRectangle = new Rectangle(0, 0, symbol.getIconWidth(), symbol.getIconHeight()); 30 36 } … … 42 48 Border b; 43 49 Point mousePosition = mv.getMousePosition(); 44 if (mousePosition == null)45 return; // mouse outside the whole window46 50 47 if (mousePressed) { 48 b = BorderFactory.createBevelBorder(BevelBorder.LOWERED); 49 } else { 50 b = BorderFactory.createBevelBorder(BevelBorder.RAISED); 51 if (mousePosition != null) { 52 // mouse is inside the window 53 if (mousePressed) { 54 b = BorderFactory.createBevelBorder(BevelBorder.LOWERED); 55 } else { 56 b = BorderFactory.createBevelBorder(BevelBorder.RAISED); 57 } 58 Insets inset = b.getBorderInsets(mv); 59 Rectangle r = new Rectangle(buttonRectangle); 60 r.grow((inset.top+inset.bottom)/2, (inset.left+inset.right)/2); 61 b.paintBorder(mv, g, r.x, r.y, r.width, r.height); 51 62 } 52 Insets inset = b.getBorderInsets(mv); 53 Rectangle r = new Rectangle(buttonRectangle); 54 r.grow((inset.top+inset.bottom)/2, (inset.left+inset.right)/2); 55 b.paintBorder(mv, g, r.x, r.y, r.width, r.height); 63 if ((text != null) && (show.equalsIgnoreCase("show")) && Main.pref.getBoolean("marker.buttonlabels")) 64 g.drawString(text, screen.x+4, screen.y+2); 56 65 } 57 66 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java
r298 r547 34 34 public URL imageUrl; 35 35 36 public static ImageMarker create(LatLon ll, String url ) {36 public static ImageMarker create(LatLon ll, String url, double offset) { 37 37 try { 38 return new ImageMarker(ll, new URL(url) );38 return new ImageMarker(ll, new URL(url), offset); 39 39 } catch (Exception ex) { 40 40 return null; … … 42 42 } 43 43 44 private ImageMarker(LatLon ll, URL imageUrl ) {45 super(ll, "photo.png" );44 private ImageMarker(LatLon ll, URL imageUrl, double offset) { 45 super(ll, "photo.png", offset); 46 46 this.imageUrl = imageUrl; 47 47 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r541 r547 64 64 public final String text; 65 65 public final Icon symbol; 66 public double offset; /* time offset in seconds from the gpx point from which it was derived, 67 may be adjusted later to sync with other data, so not final */ 66 68 67 69 /** … … 76 78 Marker.markerProducers.add(new MarkerProducers() { 77 79 public Marker createMarker(WayPoint wpt, File relativePath) { 80 return createMarker(wpt, relativePath, 0.0); 81 } 82 83 public Marker createMarker(WayPoint wpt, File relativePath, double offset) { 78 84 String uri = null; 79 85 // cheapest way to check whether "link" object exists and is a non-empty … … 90 96 uri = new File(relativePath, uri).toURI().toString(); 91 97 92 if (uri == null) { 93 String name_desc = ""; 94 if (wpt.attr.containsKey("name")) { 95 name_desc = wpt.getString("name"); 96 } else if (wpt.attr.containsKey("desc")) { 97 name_desc = wpt.getString("desc"); 98 } 99 return new Marker(wpt.latlon, name_desc, wpt.getString("symbol")); 98 String name_desc = ""; 99 if (wpt.attr.containsKey("name")) { 100 name_desc = wpt.getString("name"); 101 } else if (wpt.attr.containsKey("desc")) { 102 name_desc = wpt.getString("desc"); 100 103 } 101 102 if (uri.endsWith(".wav")) 103 return AudioMarker.create(wpt.latlon, uri); 104 105 if (uri == null) 106 return new Marker(wpt.latlon, name_desc, wpt.getString("symbol"), offset); 107 else if (uri.endsWith(".wav")) 108 return AudioMarker.create(wpt.latlon, name_desc, uri, offset); 104 109 else if (uri.endsWith(".png") || uri.endsWith(".jpg") || uri.endsWith(".jpeg") || uri.endsWith(".gif")) 105 return ImageMarker.create(wpt.latlon, uri );110 return ImageMarker.create(wpt.latlon, uri, offset); 106 111 else 107 return WebMarker.create(wpt.latlon, uri );112 return WebMarker.create(wpt.latlon, uri, offset); 108 113 } 109 114 … … 119 124 } 120 125 121 public Marker(LatLon ll, String text, String iconName ) {126 public Marker(LatLon ll, String text, String iconName, double offset) { 122 127 eastNorth = Main.proj.latlon2eastNorth(ll); 123 128 this.text = text; 129 this.offset = offset; 124 130 Icon symbol = ImageProvider.getIfAvailable("markers",iconName); 125 131 if (symbol == null) … … 177 183 * @param relativePath An path to use for constructing relative URLs or 178 184 * <code>null</code> for no relative URLs 185 * @param offset double in seconds as the time offset of this marker from 186 * the GPX file from which it was derived (if any). 179 187 * @return a new Marker object 180 188 */ 181 public static Marker createMarker(WayPoint wpt, File relativePath ) {189 public static Marker createMarker(WayPoint wpt, File relativePath, double offset) { 182 190 for (MarkerProducers maker : Marker.markerProducers) { 183 Marker marker = maker.createMarker(wpt, relativePath );191 Marker marker = maker.createMarker(wpt, relativePath, offset); 184 192 if (marker != null) 185 193 return marker; … … 187 195 return null; 188 196 } 197 198 /** 199 * Returns an AudioMarker derived from this Marker and the provided uri 200 * Subclasses of specific marker types override this to return null as they can't 201 * be turned into AudioMarkers. This includes AudioMarkers themselves, as they 202 * already have audio. 203 * 204 * @param uri uri of wave file 205 * @return AudioMarker 206 */ 207 208 public AudioMarker audioMarkerFromMarker(String uri) { 209 AudioMarker audioMarker = AudioMarker.create(Main.proj.eastNorth2latlon(this.eastNorth), this.text, uri, this.offset); 210 return audioMarker; 211 } 189 212 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r444 r547 16 16 import java.util.ArrayList; 17 17 import java.util.Collection; 18 import java.util.Iterator; 19 import java.util.Date; 20 import java.text.SimpleDateFormat; 21 import java.text.ParsePosition; 22 import java.text.ParseException; 23 import java.net.URL; 18 24 19 25 import javax.swing.Icon; 20 26 import javax.swing.JColorChooser; 27 import javax.swing.JFileChooser; 21 28 import javax.swing.JMenuItem; 22 29 import javax.swing.JOptionPane; 23 30 import javax.swing.JSeparator; 24 31 import javax.swing.SwingUtilities; 32 import javax.swing.filechooser.FileFilter; 25 33 26 34 import org.openstreetmap.josm.Main; … … 33 41 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 34 42 import org.openstreetmap.josm.gui.layer.Layer; 43 import org.openstreetmap.josm.gui.layer.markerlayer.AudioMarker; 35 44 import org.openstreetmap.josm.tools.ColorHelper; 36 45 import org.openstreetmap.josm.tools.ImageProvider; 46 import org.openstreetmap.josm.tools.AudioPlayer; 37 47 38 48 /** … … 60 70 this.associatedFile = associatedFile; 61 71 this.data = new ArrayList<Marker>(); 62 72 double offset = 0.0; 73 Date firstDate = null; 74 63 75 for (WayPoint wpt : indata.waypoints) { 64 Marker m = Marker.createMarker(wpt, indata.storageFile); 76 /* calculate time differences in waypoints */ 77 if (wpt.attr.containsKey("time")) { 78 SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); // ignore timezone, as it is all relative 79 Date d = f.parse(wpt.attr.get("time").toString(), new ParsePosition(0)); 80 if (d == null /* failed to parse */) { 81 offset = 0.0; 82 } else if (firstDate == null) { 83 firstDate = d; 84 offset = 0.0; 85 } else { 86 offset = (d.getTime() - firstDate.getTime()) / 1000.0; /* ms => seconds */ 87 } 88 } 89 90 Marker m = Marker.createMarker(wpt, indata.storageFile, offset); 65 91 if (m != null) 66 92 data.add(m); … … 73 99 if (e.getButton() != MouseEvent.BUTTON1) 74 100 return; 101 boolean mousePressedInButton = false; 102 if (e.getPoint() != null) { 103 for (Marker mkr : data) { 104 if (mkr.containsPoint(e.getPoint())) { 105 mousePressedInButton = true; 106 break; 107 } 108 } 109 } 110 if (! mousePressedInButton) 111 return; 75 112 mousePressed = true; 76 113 if (visible) … … 78 115 } 79 116 @Override public void mouseReleased(MouseEvent ev) { 80 if (ev.getButton() != MouseEvent.BUTTON1 )117 if (ev.getButton() != MouseEvent.BUTTON1 || ! mousePressed) 81 118 return; 82 119 mousePressed = false; … … 116 153 else 117 154 g.setColor(Color.GRAY); 118 155 119 156 for (Marker mkr : data) { 120 157 if (mousePos != null && mkr.containsPoint(mousePos)) { … … 143 180 for (Marker mkr : data) 144 181 v.visit(mkr.eastNorth); 182 } 183 184 public void applyAudio(File wavFile) { 185 String uri = "file:".concat(wavFile.getAbsolutePath()); 186 Collection<Marker> markers = new ArrayList<Marker>(); 187 for (Marker mkr : data) { 188 AudioMarker audioMarker = mkr.audioMarkerFromMarker(uri); 189 if (audioMarker == null) { 190 markers.add(mkr); 191 } else { 192 markers.add(audioMarker); 193 } 194 } 195 data.clear(); 196 data.addAll(markers); 145 197 } 146 198 … … 171 223 }); 172 224 225 JMenuItem applyaudio = new JMenuItem(tr("Apply Audio"), ImageProvider.get("applyaudio")); 226 applyaudio.addActionListener(new ActionListener(){ 227 public void actionPerformed(ActionEvent e) { 228 JFileChooser fc = new JFileChooser(Main.pref.get("tagimages.lastdirectory")); 229 fc.setFileSelectionMode(JFileChooser.FILES_ONLY); 230 fc.setAcceptAllFileFilterUsed(false); 231 fc.setFileFilter(new FileFilter(){ 232 @Override public boolean accept(File f) { 233 return f.isDirectory() || f.getName().toLowerCase().endsWith(".wav"); 234 } 235 @Override public String getDescription() { 236 return tr("Wave Audio files (*.wav)"); 237 } 238 }); 239 fc.showOpenDialog(Main.parent); 240 File sel = fc.getSelectedFile(); 241 if (sel == null) 242 return; 243 applyAudio(sel); 244 Main.map.repaint(); 245 } 246 }); 247 248 JMenuItem syncaudio = new JMenuItem(tr("Synchronize Audio"), ImageProvider.get("audio-sync")); 249 syncaudio.addActionListener(new ActionListener(){ 250 public void actionPerformed(ActionEvent e) { 251 adjustOffsetsOnAudioMarkers(); 252 } 253 }); 254 173 255 return new Component[] { 174 256 new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)), … … 177 259 new JSeparator(), 178 260 color, 261 new JSeparator(), 262 syncaudio, 263 applyaudio, 179 264 new JMenuItem(new RenameLayerAction(associatedFile, this)), 180 265 new JSeparator(), … … 182 267 }; 183 268 } 269 270 private void adjustOffsetsOnAudioMarkers() { 271 Marker startMarker = AudioMarker.recentlyPlayedMarker(); 272 if (startMarker != null && ! data.contains(startMarker)) { 273 // message? 274 startMarker = null; 275 } 276 if (startMarker == null) { 277 // find the first audioMarker in this layer 278 for (Marker m : data) { 279 if (m.getClass() == AudioMarker.class) { 280 startMarker = m; 281 break; 282 } 283 } 284 } 285 if (startMarker == null) { 286 // still no marker to work from - message? 287 return; 288 } 289 // apply adjustment to all subsequent audio markers in the layer 290 double adjustment = AudioPlayer.position(); // in seconds 291 boolean seenStart = false; 292 URL url = ((AudioMarker)startMarker).url(); 293 for (Marker m : data) { 294 if (m == startMarker) 295 seenStart = true; 296 if (seenStart) { 297 AudioMarker ma = (AudioMarker) m; // it must be an AudioMarker 298 if (! ma.url().equals(url)) 299 break; 300 ma.adjustOffset(adjustment); 301 } 302 } 303 } 304 305 public static void playAudio() { 306 if (Main.map == null || Main.map.mapView == null) 307 return; 308 for (Layer layer : Main.map.mapView.getAllLayers()) { 309 if (layer.getClass() == MarkerLayer.class) { 310 MarkerLayer markerLayer = (MarkerLayer) layer; 311 for (Marker marker : markerLayer.data) { 312 if (marker.getClass() == AudioMarker.class) { 313 ((AudioMarker)marker).play(); 314 break; 315 } 316 } 317 } 318 } 319 } 320 321 public static void playNextMarker() { 322 playAdjacentMarker(true); 323 } 324 325 public static void playPreviousMarker() { 326 playAdjacentMarker(false); 327 } 328 329 private static void playAdjacentMarker(boolean next) { 330 Marker startMarker = AudioMarker.recentlyPlayedMarker(); 331 if (startMarker == null) { 332 // message? 333 return; 334 } 335 Marker previousMarker = null; 336 Marker targetMarker = null; 337 boolean nextTime = false; 338 if (Main.map == null || Main.map.mapView == null) 339 return; 340 for (Layer layer : Main.map.mapView.getAllLayers()) { 341 if (layer.getClass() == MarkerLayer.class) { 342 MarkerLayer markerLayer = (MarkerLayer) layer; 343 for (Marker marker : markerLayer.data) { 344 if (marker == startMarker) { 345 if (next) { 346 nextTime = true; 347 } else { 348 ((AudioMarker)previousMarker).play(); 349 break; 350 } 351 } else if (nextTime) { 352 ((AudioMarker)marker).play(); 353 return; 354 } 355 previousMarker = marker; 356 } 357 } 358 } 359 } 360 184 361 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerProducers.java
r444 r547 27 27 * @return A Marker object, or <code>null</code>. 28 28 */ 29 public Marker createMarker(WayPoint wp, File relativePath );29 public Marker createMarker(WayPoint wp, File relativePath, double offset); 30 30 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java
r298 r547 23 23 public URL webUrl; 24 24 25 public static WebMarker create (LatLon ll, String url ) {25 public static WebMarker create (LatLon ll, String url, double offset) { 26 26 try { 27 return new WebMarker(ll, new URL(url) );27 return new WebMarker(ll, new URL(url), offset); 28 28 } catch (Exception ex) { 29 29 return null; … … 31 31 } 32 32 33 private WebMarker(LatLon ll, URL webUrl ) {34 super(ll, "web.png" );33 private WebMarker(LatLon ll, URL webUrl, double offset) { 34 super(ll, "web.png", offset); 35 35 this.webUrl = webUrl; 36 36 } -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r542 r547 238 238 currentState = states.pop(); 239 239 currentTrackSeg.add(currentWayPoint); 240 String option = "marker.namedtrackpoints"; 241 if (Main.pref.hasKey(option) && 242 Main.pref.getBoolean(option) && 240 if (Main.pref.getBoolean("marker.namedtrackpoints") && 243 241 (currentWayPoint.attr.containsKey("name") || 244 242 currentWayPoint.attr.containsKey("desc")))
Note:
See TracChangeset
for help on using the changeset viewer.