mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Merge pull request #109522 from KoBeWi/resource_of_type_Folder
Don't open folders as file in script editor
This commit is contained in:
commit
916af4680c
1 changed files with 7 additions and 1 deletions
|
@ -31,11 +31,13 @@
|
|||
#include "script_text_editor.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/dir_access.h"
|
||||
#include "core/io/json.h"
|
||||
#include "core/math/expression.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/debugger/editor_debugger_node.h"
|
||||
#include "editor/doc/editor_help.h"
|
||||
#include "editor/docks/filesystem_dock.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/gui/editor_toaster.h"
|
||||
|
@ -1241,7 +1243,11 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
|
|||
if (ScriptServer::is_global_class(p_symbol)) {
|
||||
EditorNode::get_singleton()->load_resource(ScriptServer::get_global_class_path(p_symbol));
|
||||
} else if (p_symbol.is_resource_file() || p_symbol.begins_with("uid://")) {
|
||||
EditorNode::get_singleton()->load_scene_or_resource(p_symbol);
|
||||
if (DirAccess::dir_exists_absolute(p_symbol)) {
|
||||
FileSystemDock::get_singleton()->navigate_to_path(p_symbol);
|
||||
} else {
|
||||
EditorNode::get_singleton()->load_scene_or_resource(p_symbol);
|
||||
}
|
||||
} else if (lc_error == OK) {
|
||||
_goto_line(p_row);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue