Check the Erase to History mode flags in the mid-stroke tool-key test (#16041)

A dropped pencil or block flag goes from the plain and the switched
stroke alike, so the pixel comparisons can't see it; assert the
emitted flags, as #16041's mutation list asks.
This commit is contained in:
RickiNano committed 2026-11-21 08:46:37 +01:00
1 parent 4ea8bdc827
commit 9f1b8054ba
1 file changed
+4
+4
View File
@@ -416,6 +416,10 @@ fn history_stroke_pixels(mode: &str, pressed: &serde_json::Value, switched: Opti
tool_event(&mut app, ToolEvent::Up { x: pts[4].0, y: pts[4].1 }, Modifiers::NONE);
let (id, p) = last(&app);
assert_eq!(id, "paint.historyBrush", "{mode}: {p}");
// The mode's own flags: the pixel comparisons can't see one go, as both strokes would lose it.
for flag in ["pencil", "block"] {
assert_eq!(p.get(flag) == Some(&json!(true)), mode == flag, "{mode}: {flag} in {p}");
}
let st = app.session.active().unwrap();
layer(&app).surface().unwrap().read_region(st.doc.bounds())
}