fix(properties): recolour solid meshes on a colour/layer change

ACIS solids bake their colour into the mesh, so a property-panel or ribbon
colour (or layer) change left the solid showing its old colour — only the
wires, which resolve colour at render time, updated. Run recolor_meshes
(now covering block-definition meshes too) when property targets are
invalidated, and route the ribbon colour change through the same path.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-21 02:12:58 +03:00
1 parent a492ea6300
commit 5f3eaa621c
3 files changed
+10 -2

No files matched your search

+4
View File
@@ -478,6 +478,10 @@ impl OpenCADStudio {
for &handle in handles {
self.tabs[i].scene.mark_entity_dirty(handle);
}
// Solid (ACIS) meshes bake their colour into the mesh, so a colour /
// layer change needs an explicit recolour — re-tessellating wires
// alone wouldn't update them.
self.tabs[i].scene.recolor_meshes();
self.tabs[i].scene.bump_geometry_no_blocks();
}
+2 -1
View File
@@ -5135,11 +5135,12 @@ impl OpenCADStudio {
self.ribbon.active_color = color;
} else {
self.push_undo_snapshot(i, "CHPROP");
for handle in handles {
for &handle in &handles {
if let Some(entity) = self.tabs[i].scene.document.get_entity_mut(handle) {
crate::scene::view::dispatch::apply_color(entity, color);
}
}
self.invalidate_property_targets(i, &handles);
self.tabs[i].dirty = true;
self.ribbon.active_color = color;
self.refresh_properties();