Remove auto selecting the first file for FileDialog with Save file mode selected
This commit is contained in:
parent
140f039547
commit
5cd30be56d
1 changed files with 5 additions and 2 deletions
|
@ -632,8 +632,11 @@ void FileDialog::update_file_list() {
|
|||
files.pop_front();
|
||||
}
|
||||
|
||||
if (tree->get_root() && tree->get_root()->get_first_child() && tree->get_selected() == nullptr) {
|
||||
tree->get_root()->get_first_child()->select(0);
|
||||
if (mode != FILE_MODE_SAVE_FILE) {
|
||||
// Select the first file from list if nothing is selected.
|
||||
if (tree->get_root() && tree->get_root()->get_first_child() && tree->get_selected() == nullptr) {
|
||||
tree->get_root()->get_first_child()->select(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue