From 8e2f16441730a4d72887106733b3ccc1da7de2da Mon Sep 17 00:00:00 2001 From: aiongg Date: Sun, 15 Nov 2026 11:55:31 +0000 Subject: [PATCH] fwb2-fix: DialogState::with_tab (cherry picked from commit 59ef662743f39181bcc814227362c791ef9b6f83) --- crates/menu/src/shortcuts/state.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/menu/src/shortcuts/state.rs b/crates/menu/src/shortcuts/state.rs index 6061e3609..1ef0443d3 100644 --- a/crates/menu/src/shortcuts/state.rs +++ b/crates/menu/src/shortcuts/state.rs @@ -271,6 +271,14 @@ impl DialogState { } } + /// Opens on the app tab whose [`DialogTab`](super::DialogTab) id is `tab`; an id no tab has opens on Keyboard + /// Shortcuts. + #[must_use] + pub fn with_tab(mut self, tab: &'static str) -> DialogState { + self.tab = Some(tab); + self + } + /// Whether the first frame has run. pub(crate) fn begun(&self) -> bool { self.phase != Phase::New