diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2024-08-23 09:53:16 +0300 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-17 08:57:46 +0200 |
commit | 35b4a1f374f7a922779026e431a3be4402b12c9e (patch) | |
tree | 015531fb5c88b5c4fa38e37feae8512e409ace55 /editor | |
parent | 4944d59198d1a5de2f9ed4409c8449262e4e88a6 (diff) | |
download | redot-engine-35b4a1f374f7a922779026e431a3be4402b12c9e.tar.gz |
[Windows] Emit native file dialog callback from event loop, fix selected options not saved.
(cherry picked from commit ea252675aaea6fca22a479b0e412de15401ddef2)
Diffstat (limited to 'editor')
-rw-r--r-- | editor/gui/editor_file_dialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index afc6d58d63..29f11174af 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -115,6 +115,8 @@ void EditorFileDialog::_native_dialog_cb(bool p_ok, const Vector<String> &p_file file_name = ProjectSettings::get_singleton()->localize_path(file_name); } } + selected_options = p_selected_options; + String f = files[0]; if (mode == FILE_MODE_OPEN_FILES) { emit_signal(SNAME("files_selected"), files); @@ -146,7 +148,6 @@ void EditorFileDialog::_native_dialog_cb(bool p_ok, const Vector<String> &p_file } file->set_text(f); dir->set_text(f.get_base_dir()); - selected_options = p_selected_options; filter->select(p_filter); } |