[orca] Do not treat collapsed table rows as leaf nodes if they have children



commit 3e980316f3c2226e5bcbbc47c176fd63e95c1f35
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Sep 3 00:09:59 2016 -0400

    Do not treat collapsed table rows as leaf nodes if they have children

 src/orca/script_utilities.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index cb7964b..384df4d 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -3432,6 +3432,10 @@ class Utilities:
         if not obj.childCount:
             return True
 
+        role = obj.getRole()
+        if role == pyatspi.ROLE_TABLE_ROW:
+            return False
+
         state = obj.getState()
         if state.contains(pyatspi.STATE_EXPANDABLE):
             return not state.contains(pyatspi.STATE_EXPANDED)
@@ -3439,7 +3443,7 @@ class Utilities:
         roles = [pyatspi.ROLE_COMBO_BOX,
                  pyatspi.ROLE_PUSH_BUTTON]
 
-        return obj.getRole() in roles
+        return role in roles
 
     def descendantAtPoint(self, root, x, y, coordType=None):
         if not root:


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