fix pagina non caricabile: rimozione background non valido su Label (Silica); delegate: porto ricostruito da PORTS/customPorts (ruolo array non esposto su Qt 5.6)

This commit is contained in:
2026-09-01 20:11:14 +02:00
parent f38a677d46
commit 97bc71343f
2 changed files with 7 additions and 4 deletions
-1
View File
@@ -207,7 +207,6 @@ Page {
anchors.margins: Theme.paddingSmall
color: Theme.highlightColor
font.pixelSize: Theme.fontSizeSmall
background: Rectangle { color: Theme.rgba(Theme.primaryColor, 0.1); radius: Theme.paddingSmall }
}
Timer { id: tipTimer; interval: 2500; onTriggered: tip.visible = false }
}
+7 -3
View File
@@ -112,7 +112,11 @@ Page {
}
onClicked: {
console.log("[tide] open port:", model.name, "custom:", model.custom)
page.openDetail(model.port, model.realIndex, model.custom)
// model.port (array JS) non è esposto dai ListModel su Qt 5.6:
// si ricostruisce il porto dalle strutture JS tramite l'indice.
var p = model.custom ? page.customPorts[model.customIndex]
: Tides.PORTS[model.realIndex]
page.openDetail(p, model.realIndex, model.custom)
}
}
@@ -131,7 +135,7 @@ Page {
portModel.append({
name: p[0], country: p[1],
range: "±" + (p[4][1][0] + p[4][2][0]).toFixed(2) + " m",
port: p, realIndex: i, custom: false,
realIndex: i, customIndex: -1, custom: false,
isPreferred: (pref === p[0])
})
}
@@ -142,7 +146,7 @@ Page {
portModel.append({
name: p[0], country: qsTr("searched city"),
range: "±" + (p[4][1][0] + p[4][2][0]).toFixed(2) + " m",
port: p, realIndex: -1, custom: true,
realIndex: -1, customIndex: i, custom: true,
isPreferred: (pref === p[0])
})
}