[pyatspi2] Do not use cache for children of objects with MANAGES_DESCENDANTS
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyatspi2] Do not use cache for children of objects with MANAGES_DESCENDANTS
- Date: Fri, 16 Apr 2010 17:48:22 +0000 (UTC)
commit 2dc0b46d0ec6f96b5a3b3a99f65f4f585d853767
Author: Mike Gorse <mgorse novell com>
Date: Wed Apr 7 12:02:11 2010 -0400
Do not use cache for children of objects with MANAGES_DESCENDANTS
pyatspi/accessible.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pyatspi/accessible.py b/pyatspi/accessible.py
index 957fda5..bc8c591 100644
--- a/pyatspi/accessible.py
+++ b/pyatspi/accessible.py
@@ -331,7 +331,7 @@ class Accessible(BaseProxy):
an in parameter indicating which child is requested (zero-indexed).
@return : the 'nth' Accessible child of this object.
"""
- if self.cached:
+ if self.cached and not(self._cached_data.state[0] & (1 << STATE_MANAGES_DESCENDANTS)):
(name, path) = self._cached_data.children[index]
else:
count = Int32(self._pgetter(ATSPI_ACCESSIBLE, "ChildCount"))
@@ -435,7 +435,7 @@ class Accessible(BaseProxy):
return self.__eq__(other)
def _get_childCount(self):
- if self.cached:
+ if self.cached and not(self._cached_data.state[0] & (1 << STATE_MANAGES_DESCENDANTS)):
return len(self._cached_data.children)
else:
return Int32(self._pgetter(ATSPI_ACCESSIBLE, "ChildCount"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]