[orca] Don't calculate displayed text for static text leaf nodes.



commit 2ede59e9dd851534e5691e6b679b7ed4b948007c
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Thu Jan 23 09:28:05 2020 -0500

    Don't calculate displayed text for static text leaf nodes.

 src/orca/script_utilities.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index b42a03401..01ceb1856 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2117,8 +2117,9 @@ class Utilities:
         if obj.getRole() != pyatspi.ROLE_TABLE_CELL:
             return obj
 
-        hasContent = [x for x in obj if self.displayedText(x).strip()]
-        if len(hasContent) == 1 and not self.isStaticTextLeaf(hasContent[0]):
+        children = [x for x in obj if not self.isStaticTextLeaf(x)]
+        hasContent = [x for x in children if self.displayedText(x).strip()]
+        if len(hasContent) == 1:
             return hasContent[0]
 
         return obj


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]