mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-24 10:37:03 -06:00
Fix up merged PRs: Grid Options guides follow #559, and its dialog test finds its own Spacing
- Turning guides on in Grid Options (#536) now adds the two centre guides to a presentation without any, as View › Guides does since #559 stopped drawing fixed centre lines. - The Grid Options dialog test looked for any "Spacing" label; main's ribbon has Line Spacing too, so it looks for "Spacing (pt)". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ec44671a81
commit
e90e265453
@@ -588,6 +588,10 @@ impl SlideApp {
|
||||
}
|
||||
if let Some(b) = guides {
|
||||
self.ui.guides = b;
|
||||
// As View › Guides: a presentation without guides gets the two centre guides.
|
||||
if b && self.session.active().is_some_and(|d| d.doc.guides.is_empty()) {
|
||||
let _ = self.session.execute("guide.add", &json!({"defaults": true}));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
self.dialog = Some(dialogs::Dialog::new("gridOptions"));
|
||||
@@ -1690,7 +1694,7 @@ mod tests {
|
||||
harness.run_steps(2);
|
||||
assert!(harness.query_by_label_contains("Display grid on screen").is_some());
|
||||
assert!(harness.query_by_label_contains("Snap objects to grid").is_some());
|
||||
assert!(harness.query_by_label_contains("Spacing").is_some());
|
||||
assert!(harness.query_by_label_contains("Spacing (pt)").is_some());
|
||||
let show_grid = harness
|
||||
.query_all_by_role_and_label(egui::accesskit::Role::CheckBox, "Display grid on screen")
|
||||
.next()
|
||||
|
||||
Reference in New Issue
Block a user