From 14501375751ab85e7cab7bd244afb37a91a5458d Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Sun, 8 Nov 2026 20:05:19 +0100 Subject: [PATCH] =?UTF-8?q?The=20=E2=87=A7-click=20smoothing=20test=20turn?= =?UTF-8?q?s=20Catch-up=20on=20Stroke=20End=20on=20(#11887)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test expects a smoothed ⇧-click line to reach the click, which only the catch-up does. It passed because Catch-up on Stroke End used to start on. --- crates/ui-egui/src/tools/stroke_constraint.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/tools/stroke_constraint.rs b/crates/ui-egui/src/tools/stroke_constraint.rs index 51760cc6cb..e6ac0c87bb 100644 --- a/crates/ui-egui/src/tools/stroke_constraint.rs +++ b/crates/ui-egui/src/tools/stroke_constraint.rs @@ -235,9 +235,11 @@ mod tests { // Undo removes just the last line. app.session.undo(); assert!(alpha(&app, 100, 60) == 0.0 && alpha(&app, 60, 60) > 0.9); - // The line start survives the undo (as in Photoshop). With smoothing on, the line still - // runs from (100, 20) exactly to the click. + // The line start survives the undo (as in Photoshop). With smoothing and Catch-up on + // Stroke End on (it starts off, #11887), the line still runs from (100, 20) exactly to + // the click. app.session.tools.brush.smoothing.amount = 0.6; + app.session.tools.brush.smoothing.catch_up_on_end = true; tool_event(&mut app, ToolEvent::Down { x: 20.0, y: 100.0, pressure: 1.0 }, shift); tool_event(&mut app, ToolEvent::Up { x: 20.0, y: 100.0 }, shift); assert!(alpha(&app, 20, 100) > 0.9 && alpha(&app, 40, 80) > 0.9 && alpha(&app, 90, 30) > 0.9);