forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
e9e85010d8
commit
d1a6187678
1 file changed
+13
@@ -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
|
||||
|
||||
Reference in new issue
Block a user