summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/display/drawing-item.cpp')
-rw-r--r--src/display/drawing-item.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index 8da59bbe2..ae3dd49ab 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -76,10 +76,8 @@ DrawingItem::~DrawingItem()
// g_warning("Removing item with children");
//}
- // remove from the set of cached items
- if (_cached) {
- _drawing._cached_items.erase(this);
- }
+ // remove from the set of cached items and delete cache
+ setCached(false, true);
if (_has_cache_iterator) {
_drawing._candidate_items.erase(_cache_iterator);
}