profile: avoid double recalculation of tick positions

The ticks were recalculated twice per plotDive() call:
1) When updating the position of the axes in updateChangeLine()
2) After setting the bounds in plotDive() via setBounds()

Remove the first instance. updateChangeLine() is called in
only one place [from plotDive()] and therefore, the recalculation
is always redundant. Moreover, rename the function to setPosition(),
since it doesn't do any animation at all.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-09-28 10:32:41 +02:00 committed by Dirk Hohndel
parent b0faf2e4b1
commit 99c4741508
4 changed files with 10 additions and 19 deletions

View file

@ -44,10 +44,9 @@ public:
std::pair<double, double> screenMinMax() const;
qreal valueAt(const QPointF &p) const;
qreal posAtValue(qreal value) const;
void animateChangeLine(const QRectF &rect, int animSpeed);
void setPosition(const QRectF &rect);
void setTextVisible(bool arg1);
void setLinesVisible(bool arg1);
void setLine(const QLineF &line);
void updateTicks(int animSpeed);
double width() const; // only for vertical axes
double height() const; // only for horizontal axes