forked from 1b-agent/opencadstudio-upstream
fix: finalize reviewed drawing and interaction paths
Reset stale geometry when automation replaces a drawing and resolve material paths from its directory. Cover precise indexed snapping, large-coordinate line intersections, leader ordering, invalid image buffers and browser clipboard fallback. Preserve Options dialog resizing. Validation: cargo test --workspace --all-features (866 passed); wasm32 application check; Node clipboard regression check; Python binding tests (3 passed).
This commit is contained in:
1 parent
cf12c6a272
commit
9b112e3ac0
6 files changed
+143
-9
No files matched your search
@@ -2492,4 +2492,13 @@ mod texture_limit_tests {
|
||||
let rgba = vec![0u8; 10];
|
||||
assert!(downscale_rgba_to_limit(1000, 1000, &rgba, 512).is_none());
|
||||
}
|
||||
#[test]
|
||||
fn malformed_material_images_are_rejected_even_below_the_texture_limit() {
|
||||
for (width, height, pixels) in [(0, 1, vec![]), (1, 0, vec![]), (1, 1, vec![0; 3]), (1, 1, vec![0; 5])] {
|
||||
assert!(!super::valid_rgba_size(width, height, &pixels));
|
||||
assert!(downscale_rgba_to_limit(width, height, &pixels, 16).is_none());
|
||||
}
|
||||
assert!(downscale_rgba_to_limit(1, 1, &[0; 4], 0).is_none());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1181,6 +1181,14 @@ mod tests {
|
||||
expanded.contains(&first) && expanded.contains(&second),
|
||||
"both leaders on one annotation must come back, not just one",
|
||||
);
|
||||
for handle in [first, annotation, second] {
|
||||
scene.deselect_all();
|
||||
scene.select_entity(handle, false);
|
||||
let expected = scene.selected_handles_in_order();
|
||||
scene.deselect_all();
|
||||
scene.select_entities(&[handle]);
|
||||
assert_eq!(scene.selected_handles_in_order(), expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user