From 0b98154c7812ed25591bc5dcc7b93d884e542db1 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 11 Nov 2026 16:18:26 -0800 Subject: [PATCH] Shape tools: the constrain-angle drawing test deselects between shapes The test drew an ellipse from the top-left corner of the rectangle it had just drawn, which stays selected. With a shape tool, a press on a handle of the selection's box now scales the selection, so the press scaled the rectangle instead of drawing. The test deselects before each tool draws. --- crates/engine/src/tests/constrain_tools.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/engine/src/tests/constrain_tools.rs b/crates/engine/src/tests/constrain_tools.rs index a93965eb0..41acc5417 100644 --- a/crates/engine/src/tests/constrain_tools.rs +++ b/crates/engine/src/tests/constrain_tools.rs @@ -115,6 +115,9 @@ fn constrain_angle_draws_boxes_along_the_turned_axes() { let mut s = new_doc(); set_pref(&mut s, "constrainAngle", json!(90)); for tool in ["rectangle", "ellipse"] { + // The shape drawn before stays selected, and a press on its box's corner handle would + // scale it instead of drawing. + s.execute("select.none", &json!({})).unwrap(); s.select_tool(tool, ViewInfo::default()).unwrap(); // 60 right and 20 down on the page: along axes turned 90°, 20 wide and 60 high. gesture(&mut s, Mods::default(), &[(Down, 100.0, 100.0), (Drag, 130.0, 110.0), (Drag, 160.0, 120.0), (Up, 160.0, 120.0)]);