Changeset 34755 in osm for applications/editors
- Timestamp:
- 2018-11-30T00:19:38+01:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/infomode
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/infomode/build.xml
r34523 r34755 5 5 <property name="commit.message" value="InfoMode : for shortcurt parser"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="14 153"/>7 <property name="plugin.main.version" value="14456"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java
r34523 r34755 224 224 sg: for (GpxTrackSegment seg : track.getSegments()) { 225 225 for (WayPoint S : seg.getWayPoints()) { 226 if (S. time != 0) {226 if (S.hasDate()) { 227 227 f = false; 228 228 break sg; … … 288 288 if (oldPopup != null) oldPopup.hide(); 289 289 double vel = -1; 290 if (prevWp != null && wp. time!= prevWp.time) {290 if (prevWp != null && wp.getTimeInMillis() != prevWp.getTimeInMillis()) { 291 291 vel = wp.getCoor().greatCircleDistance(prevWp.getCoor())/ 292 (wp. time-prevWp.time);292 (wp.getTime()-prevWp.getTime()); 293 293 } 294 294 infoPanel.setData(wp, trk, vel, gpxL.data.tracks); -
applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java
r33722 r34755 78 78 for (GpxTrackSegment seg : trk.getSegments()) { 79 79 for (WayPoint S : seg.getWayPoints()) { 80 if (S. time> tm) {81 tm = S. time;80 if (S.getTime() > tm) { 81 tm = S.getTime(); 82 82 } 83 83 } … … 88 88 sg: for (GpxTrackSegment seg : track.getSegments()) { 89 89 for (WayPoint S : seg.getWayPoints()) { 90 if (S. time> tm) {90 if (S.getTime() > tm) { 91 91 f = false; 92 92 break sg; … … 105 105 this.tracks = tracks; 106 106 this.trk = trk; 107 if ( wp.time == 0.0) {107 if (!wp.hasDate()) { 108 108 label1.setText(tr("No timestamp")); 109 109 but2.setVisible(false); 110 110 } else { 111 label1.setText(DateUtils.formatDateTime(wp.get Time(), DateFormat.DEFAULT, DateFormat.DEFAULT));111 label1.setText(DateUtils.formatDateTime(wp.getDate(), DateFormat.DEFAULT, DateFormat.DEFAULT)); 112 112 but2.setVisible(true); 113 113 }
Note:
See TracChangeset
for help on using the changeset viewer.