From 4e0bba9f6ade6eaf50f684b429a99d307507f2b6 Mon Sep 17 00:00:00 2001 From: Karim Jerbi Date: Sat, 11 Jul 2026 00:40:28 +0100 Subject: [PATCH] fix(viewport): clear ViewCube when toggled off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit show_viewcube was excluded from render_signature, so toggling a static (cached) view produced an identical signature — the frame was skipped and the last GPU cube pixels stayed as stale cache. Add vp.show_viewcube to render_signature so the toggle invalidates the cache and re-renders, clearing the cube. The 2D overlay is iced UI and re-laid-out correctly, which is why only it hid. --- src/scene/view/render.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scene/view/render.rs b/src/scene/view/render.rs index 77c37756d..03eb9c308 100644 --- a/src/scene/view/render.rs +++ b/src/scene/view/render.rs @@ -514,6 +514,11 @@ fn render_signature(vp: &ViewportData, clip_w: u32, clip_h: u32) -> u64 { vp.mesh_fill.hash(&mut h); vp.show_3d_edges.hash(&mut h); vp.hidden_line.hash(&mut h); + // ViewCube visibility is excluded from the *scene* signature elsewhere only + // for the live-hover pass; here it MUST invalidate the cache so toggling the + // cube (NAVVCUBE) re-renders and actually clears the last cube frame + // instead of leaving its stale pixels on the cached surface. + vp.show_viewcube.hash(&mut h); // Interaction-LOD hatch suppression: differs the signature so the settle // frame (skip_hatch flips false) re-renders with hatches and re-caches. vp.skip_hatch.hash(&mut h);