Fix track gradient scale color

This commit is contained in:
Vitaliy 2020-07-06 17:02:25 +03:00
parent 15e26432f8
commit 3bab88942a
2 changed files with 13 additions and 0 deletions

View file

@ -142,6 +142,7 @@ public class GPXDatabase {
GPX_COL_SHOW_AS_MARKERS + ", " +
GPX_COL_JOIN_SEGMENTS + ", " +
GPX_COL_SHOW_ARROWS + ", " +
GPX_COL_SHOW_START_FINISH + ", " +
GPX_COL_WIDTH + ", " +
GPX_COL_GRADIENT_SPEED_COLOR + ", " +
GPX_COL_GRADIENT_ALTITUDE_COLOR + ", " +

View file

@ -648,6 +648,18 @@ public class GpxSelectionHelper {
if (dataItem.getColor() != 0) {
gpx.setColor(dataItem.getColor());
}
if (dataItem.getGradientSpeedColor() != 0) {
gpx.setGradientScaleColor(GradientScaleType.SPEED, dataItem.getGradientSpeedColor());
}
if (dataItem.getGradientAltitudeColor() != 0) {
gpx.setGradientScaleColor(GradientScaleType.ALTITUDE, dataItem.getGradientAltitudeColor());
}
if (dataItem.getGradientSlopeColor() != 0) {
gpx.setGradientScaleColor(GradientScaleType.SLOPE, dataItem.getGradientSlopeColor());
}
if (dataItem.getGradientScaleType() != null) {
gpx.setGradientScaleType(dataItem.getGradientScaleType());
}
if (dataItem.getWidth() != null) {
gpx.setWidth(dataItem.getWidth());
}