From 6f2388796e09cfb90660cf5c12bfc47c08091ff7 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 15 Oct 2026 15:54:07 +0300 Subject: [PATCH] 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 --- src/app/command_driver/clipboard.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/app/command_driver/clipboard.rs b/src/app/command_driver/clipboard.rs index 1bfcfce95..6346cfb8c 100644 --- a/src/app/command_driver/clipboard.rs +++ b/src/app/command_driver/clipboard.rs @@ -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(_))