Show save dialog (instead of open dialog) as needed.
PiperOrigin-RevId: 865374467 Change-Id: I599333659b12b05b7c779115fa397302f4978751
This commit is contained in:
committed by
Copybara-Service
parent
1a0fe29c41
commit
b37caf6d0c
@@ -1741,7 +1741,10 @@ void App::FileDialogGui() {
|
|||||||
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
|
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
|
||||||
if (ImGui::BeginPopupModal("FileDialog", NULL,
|
if (ImGui::BeginPopupModal("FileDialog", NULL,
|
||||||
ImGuiWindowFlags_AlwaysAutoResize)) {
|
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) {
|
if (res.status == platform::DialogResult::kAccepted) {
|
||||||
tmp_.last_path[tmp_.file_dialog] = res.path;
|
tmp_.last_path[tmp_.file_dialog] = res.path;
|
||||||
|
|||||||
Reference in New Issue
Block a user