Merge pull request #28807 from bojidar-bg/28798-open-filesystem
Open selected folder when pressing the "Open" option in the menu
This commit is contained in:
commit
89c37dae49
1 changed files with 9 additions and 0 deletions
|
@ -1490,6 +1490,15 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> p_selected)
|
|||
} break;
|
||||
|
||||
case FILE_OPEN: {
|
||||
// Open folders
|
||||
TreeItem *selected = tree->get_root();
|
||||
selected = tree->get_next_selected(selected);
|
||||
while (selected) {
|
||||
if (p_selected.find(selected->get_metadata(0)) >= 0) {
|
||||
selected->set_collapsed(false);
|
||||
}
|
||||
selected = tree->get_next_selected(selected);
|
||||
}
|
||||
// Open the file
|
||||
for (int i = 0; i < p_selected.size(); i++) {
|
||||
_select_file(p_selected[i]);
|
||||
|
|
Loading…
Reference in a new issue