diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-10-18 17:26:56 -0400 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-10-18 17:26:56 -0400 |
commit | ebbe3e8c51fcf89f6b19a74497cedb5a8c448979 (patch) | |
tree | 075435b3a1b3ac57a75f1ca90865f61697c053f4 /editor/gui | |
parent | edb8e2b1b2b09236bdcd76cb6c8b40b6fbb2abaf (diff) | |
parent | 80f0b33313dae52d072ba2771a88ebcc4f0b4d6d (diff) | |
download | redot-engine-ebbe3e8c51fcf89f6b19a74497cedb5a8c448979.tar.gz |
Merge commit godotengine/godot@80f0b33313dae52d072ba2771a88ebcc4f0b4d6d
Diffstat (limited to 'editor/gui')
-rw-r--r-- | editor/gui/editor_file_dialog.cpp | 2 | ||||
-rw-r--r-- | editor/gui/editor_object_selector.cpp | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index 29ba838c9a..190b2d812c 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -1640,6 +1640,7 @@ void EditorFileDialog::_update_favorites() { for (int i = 0; i < favorited_paths.size(); i++) { favorites->add_item(favorited_names[i], theme_cache.folder); + favorites->set_item_tooltip(-1, favorited_paths[i]); favorites->set_item_metadata(-1, favorited_paths[i]); favorites->set_item_icon_modulate(-1, get_dir_icon_color(favorited_paths[i])); @@ -1721,6 +1722,7 @@ void EditorFileDialog::_update_recent() { for (int i = 0; i < recentd_paths.size(); i++) { recent->add_item(recentd_names[i], theme_cache.folder); + recent->set_item_tooltip(-1, recentd_paths[i]); recent->set_item_metadata(-1, recentd_paths[i]); recent->set_item_icon_modulate(-1, get_dir_icon_color(recentd_paths[i])); } diff --git a/editor/gui/editor_object_selector.cpp b/editor/gui/editor_object_selector.cpp index dc03a64a40..bdb46ec6c2 100644 --- a/editor/gui/editor_object_selector.cpp +++ b/editor/gui/editor_object_selector.cpp @@ -32,6 +32,7 @@ #include "editor_object_selector.h" +#include "editor/debugger/editor_debugger_inspector.h" #include "editor/editor_data.h" #include "editor/editor_node.h" #include "editor/editor_string_names.h" @@ -133,6 +134,19 @@ void EditorObjectSelector::update_path() { Ref<Texture2D> obj_icon; if (Object::cast_to<MultiNodeEdit>(obj)) { obj_icon = EditorNode::get_singleton()->get_class_icon(Object::cast_to<MultiNodeEdit>(obj)->get_edited_class_name()); + } else if (Object::cast_to<EditorDebuggerRemoteObject>(obj)) { + String class_name; + Ref<Script> base_script = obj->get_script(); + if (base_script.is_valid()) { + class_name = base_script->get_global_name(); + + if (class_name.is_empty()) { + // If there is no class_name in this script we just take the script path. + class_name = base_script->get_path(); + } + } + + obj_icon = EditorNode::get_singleton()->get_class_icon(class_name.is_empty() ? Object::cast_to<EditorDebuggerRemoteObject>(obj)->type_name : class_name); } else { obj_icon = EditorNode::get_singleton()->get_object_icon(obj); } |