From d1a6187678bd300326e7ab5a11ffea5fd00b8a03 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Mon, 28 Sep 2026 19:13:45 +0300 Subject: [PATCH] fix(copy): copied raster images, OLE frames and underlays draw their picture COPY added the entity without its derived image model, so only the frame appeared at the copy. Fixes #829 Co-Authored-By: Claude Opus 5.5 --- src/scene/modify.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/scene/modify.rs b/src/scene/modify.rs index b38290a5a..1f33bc604 100644 --- a/src/scene/modify.rs +++ b/src/scene/modify.rs @@ -766,6 +766,19 @@ impl Scene { if let Some(model) = new_model { self.hatches.insert(h, model); } + // Images draw from a derived model, not the wire frame; without + // one the copy shows only its frame. (#829) + let image = self.document.get_entity(h).and_then(|entity| { + matches!( + entity, + EntityType::RasterImage(_) | EntityType::Ole2Frame(_) | EntityType::Underlay(_) + ) + .then(|| self.image_seed_for(entity)) + .flatten() + }); + if let Some(model) = image { + self.images.insert(h, model); + } let rebuilt_history = self.copy_solid_history(src_handle, h) && self.transform_solid_history(h, t); if !rebuilt_history