From e82253e86c9892523b02022834718fb3b85a12bb Mon Sep 17 00:00:00 2001 From: Haroon Qureshi Date: Tue, 3 Feb 2026 06:13:36 -0800 Subject: [PATCH] Prevent file dialog from reopening after being dismissed. PiperOrigin-RevId: 864842269 Change-Id: I91819a3418875fe06dbed0cf7777e1dc7d358079 --- src/experimental/studio/app.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/experimental/studio/app.cc b/src/experimental/studio/app.cc index bb796f2e..4eb5bbcc 100644 --- a/src/experimental/studio/app.cc +++ b/src/experimental/studio/app.cc @@ -1779,7 +1779,8 @@ void App::FileDialogGui() { ImGui::EndPopup(); } - if (!ImGui::IsPopupOpen("FileDialog")) { + if (!ImGui::IsPopupOpen("FileDialog") && + tmp_.file_dialog != UiTempState::FileDialog_None) { const std::string& src = tmp_.last_path[tmp_.file_dialog]; strncpy(tmp_.filename, src.c_str(), src.size()); tmp_.filename[src.size()] = 0;