From b37caf6d0c7ea5c9fea7f82306d0e1f0c47114c7 Mon Sep 17 00:00:00 2001 From: Haroon Qureshi Date: Wed, 4 Feb 2026 06:19:11 -0800 Subject: [PATCH] Show save dialog (instead of open dialog) as needed. PiperOrigin-RevId: 865374467 Change-Id: I599333659b12b05b7c779115fa397302f4978751 --- src/experimental/studio/app.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/experimental/studio/app.cc b/src/experimental/studio/app.cc index 1e7af6e8..3c2c9505 100644 --- a/src/experimental/studio/app.cc +++ b/src/experimental/studio/app.cc @@ -1741,7 +1741,10 @@ void App::FileDialogGui() { ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f)); if (ImGui::BeginPopupModal("FileDialog", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { - const platform::DialogResult res = platform::OpenFileDialog(tmp_.filename); + const platform::DialogResult res = + tmp_.file_dialog == UiTempState::FileDialog_Load + ? platform::OpenFileDialog(tmp_.filename) + : platform::SaveFileDialog(tmp_.filename); if (res.status == platform::DialogResult::kAccepted) { tmp_.last_path[tmp_.file_dialog] = res.path;