mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 13:33:51 +00:00
Type: the scatter-brush Document filter test reads through the menu's cache
The test keeps one menu state with the Document filter on, so the deletion and its undo have to replace the cached families.
This commit is contained in:
@@ -1258,8 +1258,11 @@ fn the_document_filter_follows_a_scatter_brushs_edits_and_undo() {
|
||||
let name = app.run("brush.new", serde_json::json!({"type": "scatter", "name": "Type Dots"})).unwrap()["name"].clone();
|
||||
app.run("edit.clear", serde_json::json!({"ids": [id]})).unwrap();
|
||||
let db = vectorcraft_text::FontDb::global();
|
||||
let families = |app: &crate::VectorcraftApp| {
|
||||
let mut names: Vec<_> = super::document_families(db, &app.session.active().unwrap().doc).into_iter().collect();
|
||||
// One menu state throughout, so each edit has to get past the families it keeps.
|
||||
let mut st = super::MenuState { document_only: true, ..Default::default() };
|
||||
let mut families = |app: &crate::VectorcraftApp| {
|
||||
let used = super::used_families(db, &mut st, super::MenuLook::of(app)).expect("a document is open");
|
||||
let mut names: Vec<_> = used.iter().cloned().collect();
|
||||
names.sort();
|
||||
names
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user