[orca] Prefer line presentation if previous review object had no string
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Prefer line presentation if previous review object had no string
- Date: Tue, 9 Jul 2019 14:25:43 +0000 (UTC)
commit be67d8531ed20c25b0765009f2677924b4670d50
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Jul 9 10:25:04 2019 -0400
Prefer line presentation if previous review object had no string
src/orca/mouse_review.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index 5bfb914ba..8fde68564 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -114,6 +114,11 @@ class _StringContext:
return self._boundingBox
+ def getString(self):
+ """Returns the string associated with this context."""
+
+ return self._string
+
def present(self):
"""Presents this context to the user."""
@@ -244,6 +249,11 @@ class _ItemContext:
return x, y, width, height
+ def getString(self):
+ """Returns the string associated with this context."""
+
+ return self._string.getString()
+
def getTime(self):
"""Returns the time associated with this context."""
@@ -501,7 +511,7 @@ class MouseReviewer:
boundary = None
x, y, width, height = self._currentMouseOver.getBoundingBox()
- if y <= pY <= y + height:
+ if y <= pY <= y + height and self._currentMouseOver.getString():
boundary = pyatspi.TEXT_BOUNDARY_WORD_START
elif obj == self._currentMouseOver.getObject():
boundary = pyatspi.TEXT_BOUNDARY_LINE_START
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]