1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Fix MSVC warning C4706: assignment within conditional expression

Part of #66537.
This commit is contained in:
Rémi Verschelde
2022-09-28 15:59:08 +02:00
parent 14e1f36e61
commit 0e53dd642c
8 changed files with 102 additions and 67 deletions

View File

@@ -172,18 +172,20 @@ void FileDialog::shortcut_input(const Ref<InputEvent> &p_event) {
void FileDialog::set_enable_multiple_selection(bool p_enable) {
tree->set_select_mode(p_enable ? Tree::SELECT_MULTI : Tree::SELECT_SINGLE);
};
}
Vector<String> FileDialog::get_selected_files() const {
Vector<String> list;
TreeItem *item = tree->get_root();
while ((item = tree->get_next_selected(item))) {
item = tree->get_next_selected(item);
while (item) {
list.push_back(dir_access->get_current_dir().path_join(item->get_text(0)));
};
item = tree->get_next_selected(item);
}
return list;
};
}
void FileDialog::update_dir() {
if (root_prefix.is_empty()) {