mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
b0faf2e4b1
commit
99c4741508
4 changed files with 10 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue