[orca] Use parent property rather than 'in' to check if an object is in container



commit dc166175db644913bedc665dd742f1d4a7e02bcf
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Apr 25 09:44:55 2018 -0400

    Use parent property rather than 'in' to check if an object is in container

 src/orca/flat_review.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/flat_review.py b/src/orca/flat_review.py
index 6ce660e..d3f6403 100644
--- a/src/orca/flat_review.py
+++ b/src/orca/flat_review.py
@@ -825,7 +825,7 @@ class Context:
                 continue
 
             allZones.extend(zones)
-            if not focusZone and zones and (o == self.focusObj or o in self.focusObj):
+            if not focusZone and zones and self.focusObj and self.focusObj in [o, o.parent]:
                 zones = list(filter(lambda z: z.hasCaret(), zones)) or zones
                 focusZone = zones[0]
 


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