fix(hatch): sync color from entity in synced_hatch_models
Color was read from the stale HatchModel cache instead of the live entity, so property-panel color changes appeared on boundaries (wire) but not on the hatch fill pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ca07268c7c
commit
4b5f4c7ee8
1 changed files with 20 additions and 19 deletions
|
|
@ -1864,8 +1864,11 @@ impl Scene {
|
||||||
&& self.belongs_to_visible_block(handle, c.owner_handle, layout_block)
|
&& self.belongs_to_visible_block(handle, c.owner_handle, layout_block)
|
||||||
})
|
})
|
||||||
.map(|(&handle, model)| {
|
.map(|(&handle, model)| {
|
||||||
let mut m = if let Some(EntityType::Hatch(dxf)) = self.document.get_entity(handle) {
|
let entity = self.document.get_entity(handle);
|
||||||
let mut m = model.clone();
|
let mut m = model.clone();
|
||||||
|
if let Some(e) = entity {
|
||||||
|
m.color = self.render_style(e).0;
|
||||||
|
if let EntityType::Hatch(dxf) = e {
|
||||||
match &mut m.pattern {
|
match &mut m.pattern {
|
||||||
hatch_model::HatchPattern::Pattern(_) => {
|
hatch_model::HatchPattern::Pattern(_) => {
|
||||||
m.angle_offset = dxf.pattern_angle as f32;
|
m.angle_offset = dxf.pattern_angle as f32;
|
||||||
|
|
@ -1881,10 +1884,8 @@ impl Scene {
|
||||||
}
|
}
|
||||||
hatch_model::HatchPattern::Solid => {}
|
hatch_model::HatchPattern::Solid => {}
|
||||||
}
|
}
|
||||||
m
|
}
|
||||||
} else {
|
}
|
||||||
model.clone()
|
|
||||||
};
|
|
||||||
if self.selected.contains(&handle) {
|
if self.selected.contains(&handle) {
|
||||||
m.color = [0.15, 0.55, 1.00, m.color[3]];
|
m.color = [0.15, 0.55, 1.00, m.color[3]];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue