[orca] Eliminate double-presentation of Table details during structural navigation



commit 59ed832d885c68128cef0b93a6bde96d36e1729a
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Tue Jan 21 18:46:45 2020 -0500

    Eliminate double-presentation of Table details during structural navigation
    
    Calling saveFocusedObject() in setCaretPosition() had by side effect
    eliminated some chattiness when navigating by Table. Setting the priorObj
    to the table before presenting the cell solves that problem.

 src/orca/structural_navigation.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 86709ac1f..7204153f2 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -1233,7 +1233,7 @@ class StructuralNavigation:
         self._script.updateBraille(obj)
         self._script.sayLine(obj)
 
-    def _presentObject(self, obj, offset, includeContext=True):
+    def _presentObject(self, obj, offset, priorObj=None):
         """Presents the entire object to the user.
 
         Arguments:
@@ -1248,13 +1248,7 @@ class StructuralNavigation:
             return
 
         eventsynthesizer.scrollToTopEdge(obj)
-        priorObj = None
-        if not includeContext:
-            priorObj = obj
-            includeContext = True
-
-        self._script.presentObject(
-            obj, offset=offset, includeContext=includeContext, priorObj=priorObj)
+        self._script.presentObject(obj, offset=offset, priorObj=priorObj)
 
     def _presentWithSayAll(self, obj, offset):
         if self._script.inSayAll() \
@@ -2862,7 +2856,7 @@ class StructuralNavigation:
                     debug.println(debug.LEVEL_INFO, msg)
 
             self.lastTableCell = [0, 0]
-            self._presentObject(cell, 0, includeContext=False)
+            self._presentObject(cell, 0, priorObj=obj)
             [cell, characterOffset] = self._getCaretPosition(cell)
             self._setCaretPosition(cell, characterOffset)
         else:


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