mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Path mode's default Exclude in the custom-shape test; use layer.new.layer
This commit is contained in:
1 parent
5b5e706f90
commit
cc06433f0a
2 files changed
+3
-2
No files matched your search
@@ -77,7 +77,7 @@ fn new_layer_makes_a_new_shape_layer() {
|
||||
#[test]
|
||||
fn an_operation_with_a_pixel_layer_active_still_makes_a_shape_layer() {
|
||||
let mut app = app();
|
||||
app.run("layer.new", json!({})).unwrap();
|
||||
app.run("layer.new.layer", json!({})).unwrap();
|
||||
app.ui.tool_options.shape_path_op = "combine".into();
|
||||
let layers = layer_count(&app);
|
||||
drag(&mut app, [50.0, 50.0], [200.0, 200.0]);
|
||||
|
||||
@@ -539,7 +539,8 @@ fn path_mode_custom_shape_joins_its_hole_to_it() {
|
||||
app.ui.presets_ui.custom_shape = "Ring".into();
|
||||
finish_shape(&mut app, Tool::CustomShape, [20.0, 20.0], [70.0, 70.0], egui::Modifiers::NONE);
|
||||
let ops: Vec<PathOp> = app.session.active().unwrap().doc.work_path.as_ref().unwrap().subpaths.iter().map(|s| s.op).collect();
|
||||
assert_eq!(ops, [PathOp::Combine, PathOp::Combine, PathOp::Join], "the rectangle, the ring and its hole");
|
||||
// The ring takes Path mode's default operation, Exclude Overlapping Shapes (#13235).
|
||||
assert_eq!(ops, [PathOp::Combine, PathOp::Exclude, PathOp::Join], "the rectangle, the ring and its hole");
|
||||
assert_eq!(work_covered(&app, 45, 45), 0.0, "the ring's hole");
|
||||
assert_eq!(work_covered(&app, 22, 45), 1.0, "the ring");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user