Skip to content

Commit d803d5b

Browse files
committed
Walk up inheritance hierarchy when finding which script's docs to open
1 parent e37c626 commit d803d5b

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
@@ -1229,8 +1229,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
12291229
for (const Node *node : selection) {
12301230
String class_name;
12311231
Ref<Script> script_base = node->get_script();
1232-
if (script_base.is_valid()) {
1232+
while (script_base.is_valid()) {
12331233
class_name = script_base->get_global_name();
1234+
if (!class_name.is_empty()) {
1235+
break;
1236+
}
1237+
script_base = script_base->get_base_script();
12341238
}
12351239
if (class_name.is_empty()) {
12361240
class_name = node->get_class();

0 commit comments

Comments
 (0)