Changeset 6775 in josm
- Timestamp:
- 2014-01-29T22:26:53+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java ¶
r6717 r6775 575 575 int velColor =(int) Math.round(colorModeDynamic ? ((vel-minval)*255/(maxval-minval)) 576 576 : (vel <= 0 ? 0 : vel / colorTracksTune * 255)); 577 trkPnt.customColoring = colors[Math.max(0, Math.min(velColor, 255))]; 577 final int vIndex = Math.max(0, Math.min(velColor, 255)); 578 trkPnt.customColoring = vIndex == 255 ? neutralColor : colors[vIndex]; 578 579 } else { 579 trkPnt.customColoring = colors[255];580 trkPnt.customColoring = neutralColor; 580 581 } 581 582 break; … … 591 592 case time: 592 593 double t=trkPnt.time; 593 if (t >0 && t<=now){ // skip bad timestamps594 if (t > 0 && t <= now && maxval - minval > 1000) { // skip bad timestamps and very short tracks 594 595 int tColor = (int) Math.round((t-minval)*255/(maxval-minval)); 595 596 trkPnt.customColoring = colors[tColor];
Note:
See TracChangeset
for help on using the changeset viewer.