Merge pull request #74591 from Haydoggo/floating-file-dock-crash-fix

fix crash when showing file in FileSytem dock
This commit is contained in:
Yuri Sizov 2023-03-08 15:04:00 +01:00 committed by GitHub
commit 9b9bb418cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -399,8 +399,12 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
file_system_dock->navigate_to_path(edited_resource->get_path());
// Ensure that the FileSystem dock is visible.
if (file_system_dock->get_window() == get_tree()->get_root()) {
TabContainer *tab_container = (TabContainer *)file_system_dock->get_parent_control();
tab_container->set_current_tab(tab_container->get_tab_idx_from_control(file_system_dock));
} else {
file_system_dock->get_window()->grab_focus();
}
} break;
default: {