From c730eda41994455435269bd22104f3f7e12b59eb Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 22 Nov 2026 21:26:51 +0700 Subject: [PATCH] Count a modal dialog opened this pass as open, as the dialog host does --- crates/ui-egui/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 6f8ca3540f..8bb9bef5fa 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -347,12 +347,13 @@ pub struct VectorcraftApp { } impl VectorcraftApp { - /// Whether a layer that takes the keys (a modal dialog, a popup) showed in the last pass: a - /// command or a canvas gesture waits while one does. A modeless dialog blocks nothing, and the - /// job progress window does not count (its layer has the progress role). False before the app - /// has a context. + /// Whether a layer that takes the keys (a modal dialog, a popup) showed in the last pass, or a + /// modal dialog opened since: a command or a canvas gesture waits while one does. A modeless + /// dialog blocks nothing, and the job progress window does not count (its layer has the + /// progress role). False before the app has a context. pub(crate) fn any_dialog_open(&self) -> bool { self.ui_ctx.as_ref().is_some_and(|ctx| overlay::any_open(ctx, OpenFilter::Keys)) + || self.dialogs().is_some_and(|d| d.with(|h| h.shows_modal())) } /// The background job service: the one the window's host installed, or jobs that run in line