forked from 1b-agent/opencadstudio-upstream
fix(paste): pasted hatches without an association are drawn
The paste adds entities to the document directly, so the fill and raster models `add_entity` seeds were never built. An associative hatch got its model back when its pasted boundary rebuilt it; a non-associative one stayed in the drawing but was never drawn. Seed the fill, image and underlay models of the pasted entities. (#1807) Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
aa3b667110
commit
6f2388796e
1 file changed
+15
@@ -377,6 +377,21 @@ impl OpenCADStudio {
|
||||
if handle.is_null() {
|
||||
continue;
|
||||
}
|
||||
// `add_entity` seeds fill and raster models; the document-level
|
||||
// add above does not, so a pasted hatch without an association
|
||||
// to rebuild it was never drawn. (#1807)
|
||||
if matches!(
|
||||
self.tabs[i].scene.document.get_entity(handle),
|
||||
Some(
|
||||
codec::EntityType::Hatch(_)
|
||||
| codec::EntityType::Solid(_)
|
||||
| codec::EntityType::RasterImage(_)
|
||||
| codec::EntityType::Ole2Frame(_)
|
||||
| codec::EntityType::Underlay(_)
|
||||
)
|
||||
) {
|
||||
self.tabs[i].scene.reseed_derived_caches(handle);
|
||||
}
|
||||
if matches!(
|
||||
self.tabs[i].scene.document.get_entity(handle),
|
||||
Some(codec::EntityType::Block(_) | codec::EntityType::BlockEnd(_))
|
||||
|
||||
Reference in new issue
Block a user