Prevent file dialog from reopening after being dismissed.

PiperOrigin-RevId: 864842269
Change-Id: I91819a3418875fe06dbed0cf7777e1dc7d358079
This commit is contained in:
Haroon Qureshi
2026-02-03 06:13:36 -08:00
committed by Copybara-Service
parent 1a2bca4986
commit e82253e86c
+2 -1
View File
@@ -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;