Profile: keep the plotInfo in the corresponding member variable

We had the variable. As a pointer. Which we used memset to clear. Ouch -
that smells like some bad cut and paste.

With this change the object keeps the corresponding plotInfo around (just
like some others do) and can use it later. I suspect this code could use
some larger cleanup, but it's a bit too late for this in the development
cycle, I guess. I'm sure I'll regret this in the future...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-11-19 22:28:16 +00:00
parent 76c44dd6a3
commit 21658383e5
2 changed files with 20 additions and 19 deletions

View file

@ -16,6 +16,7 @@
#include "graphicsview-common.h"
#include "divelineitem.h"
#include "diveprofileitem.h"
#include "display.h"
class RulerItem2;
struct dive;
@ -145,7 +146,7 @@ private:
// All those here should probably be merged into one structure,
// So it's esyer to replicate for more dives later.
// In the meantime, keep it here.
struct plot_info *plotInfo;
struct plot_info plotInfo;
DepthAxis *profileYAxis;
PartialGasPressureAxis *gasYAxis;
TemperatureAxis *temperatureAxis;