fix tab color when all tracks have a different one

This commit is contained in:
vcoppe
2025-01-02 22:04:14 +01:00
parent bae0a3f93b
commit 2cb21a43c5
2 changed files with 14 additions and 13 deletions

View File

@@ -69,13 +69,14 @@
nodeColors = [];
if (node instanceof GPXFile) {
let style = node.getStyle();
let defaultColor = undefined;
let layer = gpxLayers.get(item.getFileId());
if (layer) {
style.color.push(layer.layerColor);
defaultColor = layer.layerColor;
}
let style = node.getStyle(defaultColor);
style.color.forEach((c) => {
if (!nodeColors.includes(c)) {
nodeColors.push(c);