Remove vertical lines in Overview Zones Tiles

They were introduced by #4779, which replaced setAxisX
which removes the previously existing default x-axis
for the new one, with addAxis which doesn't remove anything.
This change just remove the existing (default) x-axis before
to add the new one to minimize the impact in the remaining code.
This commit is contained in:
Alejandro Martinez
2026-01-04 20:09:16 -03:00
parent beede09500
commit dbd7de01b8

View File

@@ -773,6 +773,13 @@ ZoneOverviewItem::configChanged(qint32)
chart->createDefaultAxes();
// add x axis to chart and attach to the series
// previously removing default one to simulte setAxisX
QList<QAbstractAxis*> horizontalAxes = chart->axes(Qt::Horizontal, barseries);
if (horizontalAxes.size() == 1) {
chart->removeAxis(horizontalAxes.first());
} else {
qDebug() << "Expecting one horizontal axis: " << horizontalAxes.size();
}
chart->addAxis(barcategoryaxis, Qt::AlignBottom);
barseries->attachAxis(barcategoryaxis);
barcategoryaxis->setLinePen(axisPen);