Fit the landed changes together

Comment literals in tests gain the callout text box and pop-up fields, and the review-state map is formatted.
This commit is contained in:
bflatastic committed 2026-11-09 18:29:25 +07:00
1 parent dd72e2e672
commit c994a0a4ac
3 files changed
+8 -5

No files matched your search

+4 -5
View File
@@ -616,11 +616,8 @@ impl<'a> ReviewStates<'a> {
let mut reaches: HashMap<(usize, usize), Option<(usize, usize)>> = HashMap::new();
let mut by_target: HashMap<(usize, usize), Vec<&Annotation>> = HashMap::new();
// A state set on a group subordinate is the group's, its primary's (ISO 32000-2 §12.5.6.2).
let primary_of: HashMap<(usize, usize), (usize, usize)> = all
.iter()
.zip(group_primaries(all))
.filter_map(|(a, p)| all.get(p?).map(|p| ((a.page, a.index), (p.page, p.index))))
.collect();
let primary_of: HashMap<(usize, usize), (usize, usize)> =
all.iter().zip(group_primaries(all)).filter_map(|(a, p)| all.get(p?).map(|p| ((a.page, a.index), (p.page, p.index)))).collect();
for r in all.iter().filter(|a| a.state.is_some()) {
let (mut path, mut seen, mut up) = (vec![(r.page, r.index)], HashSet::from([(r.page, r.index)]), r.parent);
let target = loop {
@@ -823,6 +820,8 @@ mod review_state_tests {
fill_sign: false,
no_rotate: false,
points: Vec::new(),
text_box: None,
popup: None,
})
.collect();
link_replies(&mut all);
+2
View File
@@ -2081,6 +2081,8 @@ mod group_tests {
fill_sign: false,
no_rotate: false,
points: Vec::new(),
text_box: None,
popup: None,
}
}
@@ -579,6 +579,8 @@ fn a_replace_text_group_makes_replace_text_defaults() {
fill_sign: false,
no_rotate: false,
points: Vec::new(),
text_box: None,
popup: None,
};
let all =
vec![annot(0, "Caret", Some("Replace"), None), annot(1, "StrikeOut", Some("StrikeOutTextEdit"), Some((0, 0))), annot(2, "Caret", None, None)];