[Windows] Emit native file dialog callback from event loop, fix selected options not saved.

This commit is contained in:
bruvzg
2024-08-23 09:53:16 +03:00
parent 568589c9d8
commit ea252675aa
4 changed files with 71 additions and 51 deletions

View File

@@ -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);
}