mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Merge pull request #1209 from APriestman/incorrectThumbnails
Clear out Image Gallery thumbnail cache to prevent images from closed cases from being re-used.
This commit is contained in:
commit
d9d7217c14
@ -348,6 +348,7 @@ public final class ImageGalleryController {
|
|||||||
LOGGER.info("resetting ImageGalleryControler to initial state.");
|
LOGGER.info("resetting ImageGalleryControler to initial state.");
|
||||||
selectionModel.clearSelection();
|
selectionModel.clearSelection();
|
||||||
setListeningEnabled(false);
|
setListeningEnabled(false);
|
||||||
|
ThumbnailCache.getDefault().clearCache();
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
historyManager.clear();
|
historyManager.clear();
|
||||||
});
|
});
|
||||||
|
@ -83,6 +83,13 @@ public enum ThumbnailCache {
|
|||||||
/** thread that saves generated thumbnails to disk for use later */
|
/** thread that saves generated thumbnails to disk for use later */
|
||||||
private final Executor imageSaver = Executors.newSingleThreadExecutor(new BasicThreadFactory.Builder().namingPattern("icon saver-%d").build());
|
private final Executor imageSaver = Executors.newSingleThreadExecutor(new BasicThreadFactory.Builder().namingPattern("icon saver-%d").build());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear out the cache between cases
|
||||||
|
*/
|
||||||
|
public final void clearCache() {
|
||||||
|
cache.invalidateAll();
|
||||||
|
}
|
||||||
|
|
||||||
/** get the cached thumbnail for the given file or generate a new one if
|
/** get the cached thumbnail for the given file or generate a new one if
|
||||||
* needed
|
* needed
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user