profile: remove displayed_dive from TankItem

The only time the TankItem is replot is when new data is set.
Therefore, replot() can be folded into setData().

The good thing is that setData() is passed the dive to be
plot. So the data can be extracted from there instead of
the global displayed_dive variable.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-03 21:57:59 +01:00 committed by Dirk Hohndel
parent 9560dbf8db
commit 0146a0c892
2 changed files with 21 additions and 23 deletions

View file

@ -18,7 +18,6 @@ public:
private:
void createBar(int startTime, int stopTime, struct gasmix gas);
void replot();
const DiveCartesianAxis &hAxis;
int plotEndTime;
QBrush air, nitrox, oxygen, trimix;