fix(properties): repaint on linetype/lineweight/layer edits (#231 class)
Color/linetype/lineweight/layer are baked into the cached wire geometry at tessellation time, so a property edit only repaints if the handler bumps the geometry epoch. The color path did; several siblings only set tabs.dirty (a save flag) and never re-tessellated, leaving the viewport showing the stale look. Route every handle-based edit through invalidate_property_targets (mark dirty + recolor meshes + bump geometry), and full-bump the name-based LAYER COLOR change: - ribbon layer / linetype / lineweight dropdowns applied to a selection - CHPROP (color/linetype/ltscale/transparency/layer) - LAYMATCH (MatchEntityLayer) - LAYER COLOR <name> <aci> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
18fff5cf8c
commit
7f3ebde663
5 changed files with 30 additions and 5 deletions
|
|
@ -128,6 +128,10 @@ impl OpenCADStudio {
|
|||
l.color = acadrust::types::Color::from_index(idx);
|
||||
self.push_undo_snapshot(i, "LAYER COLOR");
|
||||
self.tabs[i].dirty = true;
|
||||
// By-layer colour is baked into every wire on
|
||||
// this layer — re-tessellate so they repaint
|
||||
// immediately (issue #231 class).
|
||||
self.tabs[i].scene.bump_geometry();
|
||||
self.command_line.push_output(&format!(
|
||||
"LAYER: '{}' color set to ACI {}.",
|
||||
layer_name, idx
|
||||
|
|
|
|||
|
|
@ -413,6 +413,11 @@ impl OpenCADStudio {
|
|||
if changed > 0 {
|
||||
self.push_undo_snapshot(i, "CHPROP");
|
||||
self.tabs[i].dirty = true;
|
||||
// Colour / linetype / ltscale / transparency /
|
||||
// layer are baked into the cached wire geometry —
|
||||
// re-tessellate the changed entities so they
|
||||
// repaint immediately (issue #231 class).
|
||||
self.invalidate_property_targets(i, &handles);
|
||||
self.command_line.push_output(&format!(
|
||||
"CHPROP: {} entity/entities updated.",
|
||||
changed
|
||||
|
|
|
|||
Loading…
Reference in a new issue