[fix](trx-frontend): keep QSO summary visible

Decouple the longest-QSO summary from the contact path render toggle.
Keep the summary filtered by current map visibility while the toggle only
controls whether path overlays are drawn.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-03-14 18:20:15 +01:00
parent 73b1d5618d
commit a1b9b7f762
@@ -4692,21 +4692,25 @@ function ensureDecodeContactPathRendered(entry) {
if (typeof entry.line.bringToBack === "function") entry.line.bringToBack(); if (typeof entry.line.bringToBack === "function") entry.line.bringToBack();
} }
function decodeContactPathBaseVisible(entry) { function decodeContactPathMatchesCurrentMap(entry) {
return mapDecodeContactPathsEnabled return decodeLocatorPathVisibility(entry.sourceGrid)
&& decodeLocatorPathVisibility(entry.sourceGrid)
&& decodeLocatorPathVisibility(entry.targetGrid); && decodeLocatorPathVisibility(entry.targetGrid);
} }
function decodeContactPathRenderVisible(entry) {
return mapDecodeContactPathsEnabled
&& decodeContactPathMatchesCurrentMap(entry);
}
function syncDecodeContactPathVisibility() { function syncDecodeContactPathVisibility() {
if (selectedMapQsoKey) { if (selectedMapQsoKey) {
const selectedEntry = decodeContactPaths.get(selectedMapQsoKey); const selectedEntry = decodeContactPaths.get(selectedMapQsoKey);
if (!selectedEntry || !decodeContactPathBaseVisible(selectedEntry)) { if (!selectedEntry || !decodeContactPathMatchesCurrentMap(selectedEntry)) {
selectedMapQsoKey = null; selectedMapQsoKey = null;
} }
} }
for (const entry of decodeContactPaths.values()) { for (const entry of decodeContactPaths.values()) {
const visible = decodeContactPathBaseVisible(entry) const visible = decodeContactPathRenderVisible(entry)
&& (!selectedMapQsoKey || entry.pathKey === selectedMapQsoKey); && (!selectedMapQsoKey || entry.pathKey === selectedMapQsoKey);
if (!visible) { if (!visible) {
clearDecodeContactPathRender(entry); clearDecodeContactPathRender(entry);
@@ -6322,7 +6326,7 @@ function renderMapQsoSummary() {
const entries = Array.from(decodeContactPaths.values()) const entries = Array.from(decodeContactPaths.values())
.filter((entry) => entry .filter((entry) => entry
&& Number.isFinite(entry.distanceKm) && Number.isFinite(entry.distanceKm)
&& decodeContactPathBaseVisible(entry)) && decodeContactPathMatchesCurrentMap(entry))
.sort((a, b) => { .sort((a, b) => {
const distanceDelta = Number(b.distanceKm) - Number(a.distanceKm); const distanceDelta = Number(b.distanceKm) - Number(a.distanceKm);
if (Math.abs(distanceDelta) > 0.001) return distanceDelta; if (Math.abs(distanceDelta) > 0.001) return distanceDelta;