mirror of
https://github.com/storytold/cadcraft.git
synced 2026-11-09 12:00:50 -06:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user