aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-29 13:23:21 +0100
committerdec05eba <dec05eba@protonmail.com>2020-10-29 13:23:21 +0100
commit4c1fac6db69efaea93e500dce9cb1129f2dba75e (patch)
treeb6e0dbd953288751525476521a8c6d69387b0feb /src
parenta8f1ebca36d90d965e8a55ebc766f659db65b0c1 (diff)
Properly cleanup embedded text items
Diffstat (limited to 'src')
-rw-r--r--src/Body.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 1ea5be2..bc5346f 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -459,9 +459,6 @@ namespace QuickMedia {
for(auto &body_item : items) {
if(elapsed_time_sec - body_item->last_drawn_time >= 1.5)
clear_body_item_cache(body_item.get());
- // The embedded item might or might not refer to another item in |items|, so we have to make sure we also check it
- if(body_item->embedded_item && elapsed_time_sec - body_item->embedded_item->last_drawn_time >= 1.5)
- clear_body_item_cache(body_item.get());
}
}
@@ -546,6 +543,9 @@ namespace QuickMedia {
body_item->timestamp_text.reset();
body_item->dirty_timestamp = true;
}
+
+ if(body_item->embedded_item)
+ clear_body_item_cache(body_item->embedded_item.get());
}
sf::Vector2i Body::get_item_thumbnail_size(BodyItem *item) const {