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
+4 -4
View File
@@ -168,10 +168,10 @@ public:
twsHstry = pageData.hstryBuffers->getBuffer("TWS");
if (twdHstry) {
twdChart.reset(new Chart(*twdHstry, Chart::dfltChrtDta["formatCourse"].range, *commonData, useSimuData));
twdChart.reset(new Chart(*twdHstry, *commonData, useSimuData));
}
if (twsHstry) {
twsChart.reset(new Chart(*twsHstry, Chart::dfltChrtDta["formatKnots"].range, *commonData, useSimuData));
twsChart.reset(new Chart(*twsHstry, *commonData, useSimuData));
}
}
@@ -180,10 +180,10 @@ public:
awsHstry = pageData.hstryBuffers->getBuffer("AWS");
if (awdHstry) {
awdChart.reset(new Chart(*awdHstry, Chart::dfltChrtDta["formatCourse"].range, *commonData, useSimuData));
awdChart.reset(new Chart(*awdHstry, *commonData, useSimuData));
}
if (awsHstry) {
awsChart.reset(new Chart(*awsHstry, Chart::dfltChrtDta["formatKnots"].range, *commonData, useSimuData));
awsChart.reset(new Chart(*awsHstry, *commonData, useSimuData));
}
if (twdHstry && twsHstry && awdHstry && awsHstry) {
LOG_DEBUG(GwLog::DEBUG, "PageWindPlot: Created wind charts");