mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move invalidate_dive_cache() to struct dive
Seems natural in a C++ code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1b593dc56c
commit
72bb38601d
11 changed files with 42 additions and 44 deletions
|
@ -36,7 +36,7 @@ void SetPictureOffset::redo()
|
|||
// If someone complains about speed, do our usual "smart" thing.
|
||||
std::sort(d->pictures.begin(), d->pictures.end());
|
||||
emit diveListNotifier.pictureOffsetChanged(d, filename, newOffset);
|
||||
invalidate_dive_cache(d);
|
||||
d->invalidate_cache();
|
||||
}
|
||||
|
||||
// Undo and redo do the same thing
|
||||
|
@ -83,7 +83,7 @@ static std::vector<PictureListForAddition> removePictures(std::vector<PictureLis
|
|||
}
|
||||
if (!toAdd.pics.empty())
|
||||
res.push_back(toAdd);
|
||||
invalidate_dive_cache(list.d);
|
||||
list.d->invalidate_cache();
|
||||
emit diveListNotifier.picturesRemoved(list.d, std::move(filenames));
|
||||
}
|
||||
picturesToRemove.clear();
|
||||
|
@ -113,7 +113,7 @@ static std::vector<PictureListForDeletion> addPictures(std::vector<PictureListFo
|
|||
}
|
||||
if (!toRemove.filenames.empty())
|
||||
res.push_back(toRemove);
|
||||
invalidate_dive_cache(list.d);
|
||||
list.d->invalidate_cache();
|
||||
emit diveListNotifier.picturesAdded(list.d, std::move(picsForSignal));
|
||||
}
|
||||
picturesToAdd.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue