ARRAY, ARRAYPATH: one OLE frame check, after the matrices (review on #2587)

A matrix every frame accepts (a rectangular array, plain translations) now needs no
look at the objects, and an empty matrix list never touches the drawing. ARRAYPATH
scans the selection once instead of once per item.
Covered by the existing refusal tests; copy_all is not reachable without a drawing
through any command, so there is no no-drawing test.
This commit is contained in:
SBaksa
2026-11-05 15:34:23 +11:00
parent 95396c032d
commit 63f53f6ed6
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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 {