Merge pull request #11884 from Noshyaar/pr-fd2
FileDialog: fix select index out of range [ci skip]
This commit is contained in:
commit
d989479744
|
@ -115,8 +115,10 @@ Vector<String> FileDialog::get_selected_files() const {
|
||||||
void FileDialog::update_dir() {
|
void FileDialog::update_dir() {
|
||||||
|
|
||||||
dir->set_text(dir_access->get_current_dir());
|
dir->set_text(dir_access->get_current_dir());
|
||||||
|
if (drives->is_visible()) {
|
||||||
drives->select(dir_access->get_current_drive());
|
drives->select(dir_access->get_current_drive());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FileDialog::_dir_entered(String p_dir) {
|
void FileDialog::_dir_entered(String p_dir) {
|
||||||
|
|
||||||
|
@ -667,7 +669,6 @@ void FileDialog::_update_drives() {
|
||||||
drives->show();
|
drives->show();
|
||||||
|
|
||||||
for (int i = 0; i < dir_access->get_drive_count(); i++) {
|
for (int i = 0; i < dir_access->get_drive_count(); i++) {
|
||||||
String d = dir_access->get_drive(i);
|
|
||||||
drives->add_item(dir_access->get_drive(i));
|
drives->add_item(dir_access->get_drive(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue