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:
dotCooCoo
2026-11-17 18:43:10 -08:00
parent e7428b7cd3
commit a83354cd99
+5 -2
View File
@@ -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
};