Add late chart object initialization to pages with charts

This commit is contained in:
Ulrich Meine
2026-07-01 02:42:02 +02:00
parent 751f4e2296
commit 04ea564bdb
4 changed files with 40 additions and 33 deletions
+5 -1
View File
@@ -243,7 +243,7 @@ public:
dataHstryBuf = pageData.hstryBuffers->getBuffer(bValName1);
if (dataHstryBuf) {
dataChart.reset(new Chart(*dataHstryBuf, Chart::dfltChrtDta[bValFormat].range, *commonData, useSimuData));
dataChart.reset(new Chart(*dataHstryBuf, *commonData, useSimuData));
LOG_DEBUG(GwLog::DEBUG, "PageOneValue: Created chart objects for %s", bValName1);
} else {
LOG_DEBUG(GwLog::DEBUG, "PageOneValue: No chart objects available for %s", bValName1);
@@ -276,6 +276,10 @@ public:
displaySetPartialWindow(0, 0, width, height); // Set partial update
if (!dataChart->isValid()) {
dataChart->init(); // try late initialization if chart object could not be properly initialized earlier due to missing boat data
}
if (pageMode == VALUE || dataHstryBuf == nullptr) {
// show only data value; ignore other pageMode options if no chart supported boat data history buffer is available
showData(bValue1, FULL);