Restore a view's visual style; no background in 2D wireframe

Restoring a named view gives the model viewport the view's visual style
(the closest render mode), and a 2D wireframe viewport shows no
background, as in the reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-12 11:24:07 +03:00
1 parent c8167c54ee
commit 8055fa710d
5 files changed
+63 -8

No files matched your search

+5 -1
View File
@@ -2571,11 +2571,15 @@ impl Scene {
} else if self.current_layout == "Model" {
let index = viewport.tile_idx.unwrap_or(0);
if let Some(value) = self.model_tile_vport(index) {
// A 2D wireframe view shows no background, as in the reference.
let flat = self.model_tiles.borrow().get(index).is_some_and(|tile| {
tile.render_mode == codec::entities::ViewportRenderMode::Wireframe2D
});
return build(
value.visual_style_handle,
value.brightness,
value.contrast,
value.background_handle,
if flat { Handle::NULL } else { value.background_handle },
);
}
}