forked from 1b-agent/opencadstudio-upstream
fix(scene): bake selection colour into greek-LOD text fill
The greek-LOD text path emits no `points` and only `fill_tris`; the face3d fill pipeline colours each triangle with `wire.color`. We were storing the entity's own colour there, so selecting a text and then zooming past the LOD boundary kept the wire.selected flag but the on-screen colour dropped back to the entity hue. Swap `wire.color` to `WireModel::SELECTED` when `selected` is set, the same way `lod_stub_wire` already does it. Follow-up to #19. Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
1 parent
f93d7cf9d2
commit
ff2485eba9
1 file changed
+6
-3
+6
-3
@@ -5036,12 +5036,15 @@ fn tessellate_entity(
|
||||
aabb,
|
||||
)];
|
||||
}
|
||||
// Greek text renders as fill_tris only; hit_test's AABB
|
||||
// fallback handles window / crossing selection. #19.
|
||||
// Greek text renders via the face3d fill batch, which colours
|
||||
// each tri with `wire.color`. Bake the selected colour in so
|
||||
// a selected text stays highlighted across the LOD boundary.
|
||||
// hit_test's AABB fallback handles window / crossing. #19.
|
||||
let fill_color = if sel { WireModel::SELECTED } else { entity_color };
|
||||
return vec![WireModel {
|
||||
name: h.value().to_string(),
|
||||
points: vec![],
|
||||
color: entity_color,
|
||||
color: fill_color,
|
||||
selected: sel,
|
||||
aci,
|
||||
pattern_length: 0.0,
|
||||
|
||||
Reference in new issue
Block a user