[orca] Mouse review: do not re-present the whole paragraph when leaving a link



commit 4dbdd7d9f28fb3f6f68cc4df90d3d3ae270e266c
Author: Colomban Wendling <cwendling hypra fr>
Date:   Thu Oct 13 08:55:21 2022 +0000

    Mouse review: do not re-present the whole paragraph when leaving a link

 src/orca/mouse_review.py | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index fd2ae975d..5f0f8da51 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -274,6 +274,19 @@ class _ItemContext:
 
         return self._time
 
+    def _isInlineChild(self, prior):
+        if not self._obj or not prior._obj:
+            return False
+
+        if prior._obj.parent != self._obj:
+            return False
+
+        if self._treatAsSingleObject():
+            return False
+
+        role = prior._obj.getRole()
+        return role == pyatspi.ROLE_LINK
+
     def present(self, prior):
         """Presents this context to the user."""
 
@@ -296,7 +309,7 @@ class _ItemContext:
             debug.println(debug.LEVEL_INFO, msg, True)
             return False
 
-        if self._obj and self._obj != prior._obj:
+        if self._obj and self._obj != prior._obj and not self._isInlineChild(prior):
             priorObj = prior._obj or self._getContainer()
             orca.emitRegionChanged(self._obj, mode=orca.MOUSE_REVIEW)
             self._script.presentObject(self._obj, priorObj=priorObj, inMouseReview=True)


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