Correctly handle case where EditorInspectorSection child isn't expandable.

This commit is contained in:
Nolan Darilek 2020-05-28 13:13:39 -05:00
parent dd9877557e
commit 2da7fcff9d

View File

@ -668,12 +668,13 @@ func is_focusable(node):
func editor_inspector_section_focused(): func editor_inspector_section_focused():
var child = node.get_children()[0] var child = node.get_children()[0]
var expanded = child.is_visible_in_tree()
var tokens = PoolStringArray(["editor inspector section"]) var tokens = PoolStringArray(["editor inspector section"])
if expanded: if child is CanvasItem or child is Spatial:
tokens.append("expanded") var expanded = child.is_visible_in_tree()
else: if expanded:
tokens.append("collapsed") tokens.append("expanded")
else:
tokens.append("collapsed")
TTS.speak(tokens.join(": "), false) TTS.speak(tokens.join(": "), false)