profile: don't show "base line" for axes without labels/grid

The axes are implemented by a line, which determines the
position. For axes without labels/grids this looks ominous.
For now, make the line invisible. But really, this should
be changed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-12-04 21:52:25 +01:00 committed by Dirk Hohndel
parent 3579e36b7d
commit 7e4973c5b1

View file

@ -57,6 +57,12 @@ DiveCartesianAxis::DiveCartesianAxis(Position position, bool inverted, int integ
}
std::tie(labelWidth, labelHeight) = DiveTextItem::getLabelSize(dpr, labelScale, label);
// The axis is implemented by a line, which gives the position.
// If we don't show labels or grid, we don't want to show the line,
// as this gives a strange artifact. TODO: Don't derive from a
// line object in the first place.
setVisible(textVisible || linesVisible);
}
DiveCartesianAxis::~DiveCartesianAxis()