Skip to content

Commit

Permalink
Update GPXUtilities.java
Browse files Browse the repository at this point in the history
  • Loading branch information
sonora authored Aug 29, 2024
1 parent 46bb7fd commit ee7378f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OsmAnd-java/src/main/java/net/osmand/gpx/GPXUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -1984,14 +1984,20 @@ private static Map<String, PointsGroup> mergePointsGroups(List<PointsGroup> grou
int color = point.getColor();
if (pointsGroup.color == 0 && color != 0) {
pointsGroup.color = color;
} else if (pointsGroup.color != 0 && color == 0) {
point.setColor(pointsGroup.color);
}
String iconName = point.getIconName();
if (Algorithms.isEmpty(pointsGroup.iconName) && !Algorithms.isEmpty(iconName)) {
pointsGroup.iconName = iconName;
} else if (!Algorithms.isEmpty(pointsGroup.iconName) && Algorithms.isEmpty(iconName)) {
point.setIconName(pointsGroup.iconName);
}
String backgroundType = point.getBackgroundType();
if (Algorithms.isEmpty(pointsGroup.backgroundType) && !Algorithms.isEmpty(backgroundType)) {
pointsGroup.backgroundType = backgroundType;
} else if (!Algorithms.isEmpty(pointsGroup.backgroundType) && Algorithms.isEmpty(backgroundType)) {
point.setBackgroundType(pointsGroup.backgroundType);
}
pointsGroup.points.add(point);
}
Expand Down

0 comments on commit ee7378f

Please sign in to comment.