fix: invalidate wipeout render cache on INSERT copy and grip moves

This commit is contained in:
gianlucafiore committed 2026-10-12 18:14:13 -03:00
1 parent 1074c81f52
commit fe0edb619f
1 file changed
+8 -4
+8 -4
View File
@@ -7917,15 +7917,19 @@ impl Scene {
let cache = self.wipeout_cache.borrow(); let cache = self.wipeout_cache.borrow();
match cache.get(&key) { match cache.get(&key) {
Some((cached_epoch, arc)) Some((cached_epoch, arc))
// wipeout_models scans the whole document for Wipeout // The displayed wipeout set also contains masks
// entities; relevance = the changed handle is a Wipeout. // expanded from INSERTs. COPY and grip edits modify or
// add INSERT handles without changing the child WIPEOUT
// entity, so the old predicate reused stale positions
// until REGEN. Track both categories, including
// removed INSERTs via the recorded removal bits.
if self.category_cache_valid( if self.category_cache_valid(
*cached_epoch, *cached_epoch,
CACHE_CATEGORY_WIPEOUT, CACHE_CATEGORY_WIPEOUT | CACHE_CATEGORY_INSERT_HATCH,
|h| { |h| {
matches!( matches!(
self.document.get_entity(h), self.document.get_entity(h),
Some(EntityType::Wipeout(_)) Some(EntityType::Wipeout(_) | EntityType::Insert(_))
) )
}, },
) => ) =>