mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
cleanup: don't keep pointer-to-picture in PictureEntry
The DivePictureModel kept a pointer to picture for each entry. Firstly, this is dangerous from a data-consistency point of view. Secondly, the entry wasn't even used anywhere. Remove it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1c420dc64a
commit
abf9650280
2 changed files with 1 additions and 2 deletions
|
@ -59,7 +59,7 @@ void DivePictureModel::updateDivePictures()
|
||||||
if (dive->selected) {
|
if (dive->selected) {
|
||||||
int first = pictures.count();
|
int first = pictures.count();
|
||||||
FOR_EACH_PICTURE(dive)
|
FOR_EACH_PICTURE(dive)
|
||||||
pictures.push_back({ dive->id, picture, picture->filename, {}, picture->offset.seconds, {.seconds = 0}});
|
pictures.push_back({ dive->id, picture->filename, {}, picture->offset.seconds, {.seconds = 0}});
|
||||||
|
|
||||||
// Sort pictures of this dive by offset.
|
// Sort pictures of this dive by offset.
|
||||||
// Thus, the list will be sorted by (diveId, offset).
|
// Thus, the list will be sorted by (diveId, offset).
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
struct PictureEntry {
|
struct PictureEntry {
|
||||||
int diveId;
|
int diveId;
|
||||||
struct picture *picture;
|
|
||||||
QString filename;
|
QString filename;
|
||||||
QImage image;
|
QImage image;
|
||||||
int offsetSeconds;
|
int offsetSeconds;
|
||||||
|
|
Loading…
Reference in a new issue