mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user