Fix all segments checkbox

This commit is contained in:
Blaz Kristan 2022-12-16 23:20:49 +01:00
parent a802bb2736
commit bfbc1ebb13
2 changed files with 742 additions and 741 deletions

View File

@ -796,11 +796,12 @@ function populateSegments(s)
gId('segcont').innerHTML = cn; gId('segcont').innerHTML = cn;
let noNewSegs = (lowestUnused >= maxSeg); let noNewSegs = (lowestUnused >= maxSeg);
resetUtil(noNewSegs); resetUtil(noNewSegs);
if (gId('selall')) gId('selall').checked = true;
for (var i = 0; i <= lSeg; i++) { for (var i = 0; i <= lSeg; i++) {
updateLen(i); updateLen(i);
updateTrail(gId(`seg${i}bri`)); updateTrail(gId(`seg${i}bri`));
gId(`segr${i}`).style.display = "none"; gId(`segr${i}`).style.display = "none";
if (!gId(`seg${i}sel`).checked && gId('selall')) gId('selall').checked = false; if (!gId(`seg${i}sel`).checked && gId('selall')) gId('selall').checked = false; // uncheck if at least one is unselected.
} }
if (segCount < 2) gId(`segd${lSeg}`).style.display = "none"; if (segCount < 2) gId(`segd${lSeg}`).style.display = "none";
if (!isM && !noNewSegs && (cfg.comp.seglen?parseInt(gId(`seg${lSeg}s`).value):0)+parseInt(gId(`seg${lSeg}e`).value)<ledCount) gId(`segr${lSeg}`).style.display = "inline"; if (!isM && !noNewSegs && (cfg.comp.seglen?parseInt(gId(`seg${lSeg}s`).value):0)+parseInt(gId(`seg${lSeg}e`).value)<ledCount) gId(`segr${lSeg}`).style.display = "inline";

File diff suppressed because it is too large Load Diff