Skip to content

Commit 5a71e5a

Browse files
committed
Merge pull request godotengine#105806 from Grublady/scene_dock_open_doc
Walk up inheritance hierarchy when finding which script's docs to open
2 parents aa1ca2b + d803d5b commit 5a71e5a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

editor/scene_tree_dock.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,8 +1234,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
12341234
for (const Node *node : selection) {
12351235
String class_name;
12361236
Ref<Script> script_base = node->get_script();
1237-
if (script_base.is_valid()) {
1237+
while (script_base.is_valid()) {
12381238
class_name = script_base->get_global_name();
1239+
if (!class_name.is_empty()) {
1240+
break;
1241+
}
1242+
script_base = script_base->get_base_script();
12391243
}
12401244
if (class_name.is_empty()) {
12411245
class_name = node->get_class();

0 commit comments

Comments
 (0)