mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
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:
1 parent
4ea8bdc827
commit
9f1b8054ba
1 file changed
+4
@@ -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())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user