[orca] Take the possibility of nested cells into consideration when getting cellIndex



commit bdd2fb31414f7e0a48b54da606f7525dc092c784
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue May 19 18:33:49 2020 -0400

    Take the possibility of nested cells into consideration when getting cellIndex

 src/orca/script_utilities.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 6a15af114..53190ba64 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -273,6 +273,8 @@ class Utilities:
         if index:
             return int(index)
 
+        isCell = lambda x: x and x.getRole() in self.getCellRoles()
+        obj = pyatspi.findAncestor(obj, isCell) or obj
         return obj.getIndexInParent()
 
     def childNodes(self, obj):


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