diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-14 22:14:23 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-06 13:58:09 -0700 |
commit | bd960ea088aebb19de9cdee455103e1878e2506f (patch) | |
tree | abb109abf6e5656c48f38a7ee7da98829856906c /qt-models/divepicturemodel.h | |
parent | 0d06eb83d87302c235f682e95a767d4e37904ea6 (diff) | |
download | subsurface-bd960ea088aebb19de9cdee455103e1878e2506f.tar.gz |
media: store dive instead of dive-id in DivePictureModel
dive-pointers are stable and the dive picture model is reset
if a selected dive is removed, so there is no risk in keeping
pointers.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divepicturemodel.h')
-rw-r--r-- | qt-models/divepicturemodel.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h index 2d628f429..523d552e3 100644 --- a/qt-models/divepicturemodel.h +++ b/qt-models/divepicturemodel.h @@ -10,15 +10,15 @@ // We use std::string instead of QString to use the same character-encoding // as in the C core (UTF-8). This is crucial to guarantee the same sort-order. +struct dive; struct PictureEntry { - int diveId; + dive *d; std::string filename; QImage image; int offsetSeconds; duration_t length; }; -struct dive; class DivePictureModel : public QAbstractTableModel { Q_OBJECT public: |