mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
G1: keep Artboard deletion consistent across controls
Co-authored-by: Codex <[email protected]>
This commit is contained in:
1 parent
5f4da3beb2
commit
bb07d267aa
13 files changed
+834
-40
No files matched your search
@@ -459,10 +459,12 @@ fn artboard_tool_moves_with_art_creates_and_deletes() {
|
||||
assert!(s.tool_claims_key(ToolKey::Delete, ViewInfo::default()));
|
||||
s.tool_key(ToolKey::Delete, Mods::default(), ViewInfo::default()).unwrap();
|
||||
assert_eq!(s.doc().unwrap().doc.artboards.len(), 1);
|
||||
// The last artboard can't be deleted, so Delete stays the shortcut's.
|
||||
assert!(!s.tool_claims_key(ToolKey::Delete, ViewInfo::default()));
|
||||
s.tool_key(ToolKey::Delete, Mods::default(), ViewInfo::default()).unwrap();
|
||||
assert_eq!(s.doc().unwrap().doc.artboards.len(), 1);
|
||||
// The last artboard can't be deleted, but neither key may fall through to Clear.
|
||||
for key in [ToolKey::Delete, ToolKey::Backspace] {
|
||||
assert!(s.tool_claims_key(key, ViewInfo::default()));
|
||||
s.tool_key(key, Mods::default(), ViewInfo::default()).unwrap();
|
||||
assert_eq!(s.doc().unwrap().doc.artboards.len(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user