mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: merge plotDive() into draw() call
Rendering resets the size, which now recalculates the axes. Therefore, plotDive() must be called. The callers were doing the opposite: call plotDive() first, then draw(). To make it easier for the callers, present a single interface that handles these subtleties. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d0beae59f9
commit
8046a05e95
7 changed files with 22 additions and 39 deletions
|
|
@ -48,8 +48,9 @@ public:
|
|||
void plotDive(const struct dive *d, int dc, DivePlannerPointsModel *plannerModel = nullptr, bool inPlanner = false,
|
||||
bool instant = false, bool calcMax = true);
|
||||
|
||||
void draw(QPainter *painter, const QRect &pos);
|
||||
QImage toImage(QSize size);
|
||||
void draw(QPainter *painter, const QRect &pos,
|
||||
const struct dive *d, int dc,
|
||||
DivePlannerPointsModel *plannerModel = nullptr, bool inPlanner = false);
|
||||
|
||||
const struct dive *d;
|
||||
int dc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue