Profile: Change RulerItem2 to use index instead of pointer

To make the pressure data dynamic (size of the arrays depending
on the cylinders in the dive), it has to be separated from the
standard plot_data structure. To enable this, use indexes instead
of pointers to plot_data elements. This commit converts
the RulerItem2 to use an index.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-07-06 11:49:29 +02:00 committed by Dirk Hohndel
parent 3025e0630d
commit fbd74c26d6
2 changed files with 15 additions and 16 deletions

View file

@ -25,7 +25,7 @@ protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
private:
struct plot_info pInfo;
struct plot_data *entry;
int idx;
RulerItem2 *ruler;
DiveCartesianAxis *timeAxis;
DiveCartesianAxis *depthAxis;