Merge pull request #4163 from njohnston/split_multiple_segments_fix
Fix drawing splits for tracks with multiple segments
This commit is contained in:
commit
2dad676e84
1 changed files with 15 additions and 15 deletions
|
@ -278,8 +278,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
// request to load
|
||||
for (SelectedGpxFile g : selectedGPXFiles) {
|
||||
List<GpxDisplayGroup> groups = g.getDisplayGroups();
|
||||
if (groups != null) {
|
||||
for (GpxDisplayGroup group : groups) {
|
||||
if (groups != null && !groups.isEmpty()) {
|
||||
GpxDataItem gpxDataItem = view.getApplication().getGpxDatabase().getItem(new File(g.getGpxFile().path));
|
||||
int color = gpxDataItem.getColor();
|
||||
if (color == 0) {
|
||||
|
@ -291,13 +290,14 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
|
||||
paintInnerRect.setColor(color);
|
||||
paintInnerRect.setAlpha(179);
|
||||
List<GpxDisplayItem> items = group.getModifiableList();
|
||||
|
||||
List<GpxDisplayItem> items = groups.get(0).getModifiableList();
|
||||
|
||||
drawSplitItems(canvas, tileBox, items, settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void drawSplitItems(Canvas canvas, RotatedTileBox tileBox, List<GpxDisplayItem> items, DrawSettings settings) {
|
||||
final QuadRect latLonBounds = tileBox.getLatLonBounds();
|
||||
|
|
Loading…
Reference in a new issue