aboutsummaryrefslogtreecommitdiff
path: root/src/AsyncImageLoader.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-08 13:39:11 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-08 13:39:11 +0200
commit0f0bf1c649388c07ae6e8dd784d7402f68691b96 (patch)
tree22868fcd37cdc15c6d0b6002d85b7c1676b2f34d /src/AsyncImageLoader.cpp
parentda95623137f85b07abf9f56035c23819af1e7fe9 (diff)
Remove images that are not visible from the loading queue, prepare for inline images
Diffstat (limited to 'src/AsyncImageLoader.cpp')
-rw-r--r--src/AsyncImageLoader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp
index 1769846..1a1e120 100644
--- a/src/AsyncImageLoader.cpp
+++ b/src/AsyncImageLoader.cpp
@@ -227,6 +227,9 @@ namespace QuickMedia {
bool loaded_textures_changed = false;
for(auto it = thumbnails.begin(); it != thumbnails.end();) {
if(it->second->counter != counter) {
+ image_load_queue.erase_if([&it](ThumbnailLoadData &load_data) {
+ return load_data.path.data == it->first;
+ });
it = thumbnails.erase(it);
loaded_textures_changed = true;
} else {