diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-02 18:47:56 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-05 10:14:25 -0800 |
commit | 76a5a38f5e8aad339061f534df8130b426079a03 (patch) | |
tree | c86f07458d4af78431facdb45ccf6c0368e8baa9 /qt-models/weightmodel.h | |
parent | 936362c1020a87a4c34252913f2cd5d49716c432 (diff) | |
download | subsurface-76a5a38f5e8aad339061f534df8130b426079a03.tar.gz |
Cleanup: remove displayed_dive from WeightModel
The WeightModel always acted on the displayed dive. To support undo
of weightsystem changes, operate on an arbitrary dive. This is
in line with other models, where the updateDive() function resets
the model to represent a certain dive.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/weightmodel.h')
-rw-r--r-- | qt-models/weightmodel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-models/weightmodel.h b/qt-models/weightmodel.h index 21737a42c..444d8611e 100644 --- a/qt-models/weightmodel.h +++ b/qt-models/weightmodel.h @@ -25,7 +25,7 @@ public: void passInData(const QModelIndex &index, const QVariant &value); void add(); void clear(); - void updateDive(); + void updateDive(dive *d); weightsystem_t *weightSystemAt(const QModelIndex &index); bool changed; @@ -35,6 +35,7 @@ slots: void weightsystemsReset(const QVector<dive *> &dives); private: + dive *d; int rows; }; |