Merge branch 'r2.7' of ssh://github.com/osmandapp/Osmand into fix_crash_in_track_activity
This commit is contained in:
commit
57eae66adf
3 changed files with 9 additions and 7 deletions
|
@ -528,10 +528,9 @@ public class GpxSelectionHelper {
|
|||
public void processPoints() {
|
||||
update();
|
||||
this.processedPointsToDisplay = gpxFile.proccessPoints();
|
||||
List<TrkSegment> processedRoutePointsToDisplay = gpxFile.processRoutePoints();
|
||||
if (!processedRoutePointsToDisplay.isEmpty()) {
|
||||
this.processedPointsToDisplay.addAll(processedRoutePointsToDisplay);
|
||||
routePoints = !processedRoutePointsToDisplay.isEmpty();
|
||||
if (this.processedPointsToDisplay.isEmpty()) {
|
||||
this.processedPointsToDisplay = gpxFile.processRoutePoints();
|
||||
routePoints = !this.processedPointsToDisplay.isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -305,7 +305,8 @@ public class TrackDetailsMenu {
|
|||
|
||||
if (trackChartPoints == null) {
|
||||
trackChartPoints = new TrackChartPoints();
|
||||
int segmentColor = getTrackSegment(chart).getColor(0);
|
||||
TrkSegment segment = getTrackSegment(chart);
|
||||
int segmentColor = segment != null ? segment.getColor(0) : 0;
|
||||
trackChartPoints.setSegmentColor(segmentColor);
|
||||
trackChartPoints.setGpx(getGpxItem().group.getGpx());
|
||||
}
|
||||
|
|
|
@ -1314,10 +1314,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
|||
}
|
||||
if (gpxItem.analysis.hasSpeedData) {
|
||||
list.add(GPXDataSetType.SPEED);
|
||||
} else {
|
||||
} else if (gpxItem.analysis.hasElevationData) {
|
||||
list.add(GPXDataSetType.SLOPE);
|
||||
}
|
||||
gpxItem.chartTypes = list.toArray(new GPXDataSetType[list.size()]);
|
||||
if (list.size() > 0) {
|
||||
gpxItem.chartTypes = list.toArray(new GPXDataSetType[list.size()]);
|
||||
}
|
||||
if (gpxItem.group.getGpx() != null) {
|
||||
gpxItem.wasHidden = app.getSelectedGpxHelper().getSelectedFileByPath(gpxInfo.file.getAbsolutePath()) == null;
|
||||
app.getSelectedGpxHelper().setGpxFileToDisplay(gpxItem.group.getGpx());
|
||||
|
|
Loading…
Reference in a new issue