DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Integration: format the Paragraph Style Options justification check (#531 × paragraph style sections)
aionggbfe6cf851815
diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rsindex d15f6fdbf..99ea47f97 100644--- a/crates/ui-egui/src/dialogs.rs+++ b/crates/ui-egui/src/dialogs.rs@@ -2656,7 +2656,8 @@ fn confirm_paragraph_style_options(app: &mut DesignApp, d: &mut Dialog) -> Resullet name = d.s("name");// What the Justification section showed: the style's own values, or a new style's Based On.let shown = if d.b("new") { d.s("basedOn") } else { name.clone() };- let base = app.session.active().map(|st| serde_json::to_value(st.doc.styles.resolve_para_style(&shown).0).unwrap_or_default()).unwrap_or_default();+ let base =+ app.session.active().map(|st| serde_json::to_value(st.doc.styles.resolve_para_style(&shown).0).unwrap_or_default()).unwrap_or_default();if let Err(e) = check_justification(d, "p.", &base) {// The caller shows the reason in the dialog's status line.d.fields.insert("section".into(), json!("justify"));