diff --git a/crates/engine/src/cmd/array.rs b/crates/engine/src/cmd/array.rs index c4948c9e0..89c6013d2 100644 --- a/crates/engine/src/cmd/array.rs +++ b/crates/engine/src/cmd/array.rs @@ -250,8 +250,8 @@ fn copy_all(s: &mut Session, hs: &[Handle], mats: impl Iterator) -> // Every copy is checked before the first is made: a refusal part way would leave the copies // already added in the drawing (a failed command is not rolled back). let mats: Vec = mats.collect(); - // The objects are looked at once; then a matrix only needs its own check. - if super::modify::holds_ole_frame(s, hs, true)? && mats.iter().any(|m| !cadcraft_doc::ole_frame_accepts(m)) { + // A matrix every frame accepts needs no look at the objects; otherwise they are looked at once. + if mats.iter().any(|m| !cadcraft_doc::ole_frame_accepts(m)) && super::modify::holds_ole_frame(s, hs, true)? { return Err(super::modify::ole_refusal()); } let mut n = 0; diff --git a/crates/engine/src/cmd/modify2/patharray.rs b/crates/engine/src/cmd/modify2/patharray.rs index aff058ab5..dd9597177 100644 --- a/crates/engine/src/cmd/modify2/patharray.rs +++ b/crates/engine/src/cmd/modify2/patharray.rs @@ -46,8 +46,8 @@ pub(crate) fn arraypath( } // Every copy is checked before the first is made: a refusal part way would leave the copies // already added in the drawing (a failed command is not rolled back). - for m in &mats { - crate::cmd::modify::refuse_ole_frames(s, &objs, m, true)?; + if mats.iter().any(|m| !cadcraft_doc::ole_frame_accepts(m)) && crate::cmd::modify::holds_ole_frame(s, &objs, true)? { + return Err(crate::cmd::modify::ole_refusal()); } let mut out = Vec::new(); for m in &mats {