ElyDoc: closing a tab takes its export or print dialog, no crash (D-01)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 12:06:47 -04:00
1 parent ec87e28a46
commit 1f4807c81c
5 files changed
+28 -2

No files matched your search

+8
View File
@@ -85,6 +85,14 @@ impl Host for Docs {
self.offer_spelling(id, view, cx);
}
/// A dialog about a closed tab goes with it.
fn tab_closed(&mut self, tab: &ely_office::Tab<Extra, ely_office::Lok>, cx: &mut Context<Self>) {
if matches!(self.dialog, Some(Dialog::Output { tab: of, .. }) if of == tab.id) {
self.dialog = None;
cx.notify();
}
}
fn search_leaves(&mut self, cx: &mut Context<Self>) {
self.mark_place(cx);
}