From fe0edb619f880fad9ddc1286c121fe77be2c442c Mon Sep 17 00:00:00 2001 From: gianlucafiore <50465150+gianlucafiore@users.noreply.github.com> Date: Mon, 12 Oct 2026 18:14:13 -0300 Subject: [PATCH] fix: invalidate wipeout render cache on INSERT copy and grip moves --- src/scene/mod.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 978a780b6..497bba455 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -7917,15 +7917,19 @@ impl Scene { let cache = self.wipeout_cache.borrow(); match cache.get(&key) { Some((cached_epoch, arc)) - // wipeout_models scans the whole document for Wipeout - // entities; relevance = the changed handle is a Wipeout. + // The displayed wipeout set also contains masks + // 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( *cached_epoch, - CACHE_CATEGORY_WIPEOUT, + CACHE_CATEGORY_WIPEOUT | CACHE_CATEGORY_INSERT_HATCH, |h| { matches!( self.document.get_entity(h), - Some(EntityType::Wipeout(_)) + Some(EntityType::Wipeout(_) | EntityType::Insert(_)) ) }, ) =>