fix: init cpuCores with correct count on first stat tick regardless of consumers
This commit is contained in:
parent
bc9eda464c
commit
d2aacac55c
1 changed files with 7 additions and 0 deletions
|
|
@ -72,6 +72,13 @@ QtObject {
|
|||
history: hist.length > histLen ? hist.slice(hist.length - histLen) : hist
|
||||
};
|
||||
});
|
||||
} else if (root.cpuCores.length !== ev.cores.length) {
|
||||
// Keep count in sync so panel can size correctly before consumers activate
|
||||
root.cpuCores = ev.cores.map(c => ({
|
||||
"usage": c.usage,
|
||||
"freq_ghz": c.freq_ghz,
|
||||
"history": []
|
||||
}));
|
||||
}
|
||||
} else if (ev.type === "temp") {
|
||||
root.tempCelsius = ev.celsius;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue