From 2da7fcff9dbd9b2ffd73355c0b2f4962dd87d7cf Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 28 May 2020 13:13:39 -0500 Subject: [PATCH] Correctly handle case where `EditorInspectorSection` child isn't expandable. --- Accessible.gd | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Accessible.gd b/Accessible.gd index 3ffa5c9..2d6efe4 100644 --- a/Accessible.gd +++ b/Accessible.gd @@ -668,12 +668,13 @@ func is_focusable(node): func editor_inspector_section_focused(): var child = node.get_children()[0] - var expanded = child.is_visible_in_tree() var tokens = PoolStringArray(["editor inspector section"]) - if expanded: - tokens.append("expanded") - else: - tokens.append("collapsed") + if child is CanvasItem or child is Spatial: + var expanded = child.is_visible_in_tree() + if expanded: + tokens.append("expanded") + else: + tokens.append("collapsed") TTS.speak(tokens.join(": "), false)