mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Pencil: cover a mixed pressure setting across tool switches (#11962)
This commit is contained in:
1 parent
7b8fb4fedc
commit
f41a39276a
1 file changed
+10
@@ -106,6 +106,16 @@ fn the_brush_keeps_its_own_pressure_flags() {
|
||||
h.state_mut().ui.tool = Tool::Pencil;
|
||||
h.run_steps(4);
|
||||
assert_eq!(flags(&h), (false, false), "the Pencil stayed off");
|
||||
|
||||
// A mixed setting: opacity on, size off, across a switch and back.
|
||||
toggle(&mut h, "Always use pressure for opacity");
|
||||
assert_eq!(flags(&h), (true, false), "mixed: opacity on, size off");
|
||||
h.state_mut().ui.tool = Tool::Brush;
|
||||
h.run_steps(4);
|
||||
assert_eq!(flags(&h), (true, true), "the Brush still has its own pair");
|
||||
h.state_mut().ui.tool = Tool::Pencil;
|
||||
h.run_steps(4);
|
||||
assert_eq!(flags(&h), (true, false), "the mixed pair came back unchanged");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user