diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-11 04:08:16 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-11 04:08:16 +0200 |
commit | 043b54f9d5c06257e33c9a0989158d9a99368e26 (patch) | |
tree | deeb5986f49af47806143dab6ca9499faa5675f2 /src/Body.cpp | |
parent | 8aaf837c6f223c77563b6ed03eb7576163f784bb (diff) |
Cleanup thumbnail textures when hiding related videos menu
Diffstat (limited to 'src/Body.cpp')
-rw-r--r-- | src/Body.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index 61d100b..a9dc18f 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -74,6 +74,10 @@ namespace QuickMedia { selected_item = 0; } + void Body::clear_thumbnails() { + item_thumbnail_textures.clear(); + } + BodyItem* Body::get_selected() const { if(items.empty() || !items[selected_item]->visible) return nullptr; @@ -186,6 +190,7 @@ namespace QuickMedia { } if(draw_thumbnails && !item->thumbnail_url.empty()) { auto &item_thumbnail = item_thumbnail_textures[item->thumbnail_url]; + item_thumbnail.referenced = false; float image_height = image_max_height; if(item_thumbnail.texture && item_thumbnail.texture->getNativeHandle() != 0) { auto image_size = item_thumbnail.texture->getSize(); |