[orca] Mouse review: Don't re-present headers when they haven't changed



commit db4a4cb579fc23a89d0cc18523aa9be045e9ce2c
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue May 26 19:16:52 2020 -0400

    Mouse review: Don't re-present headers when they haven't changed

 src/orca/speech_generator.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 3cf082f2c..26ca3d225 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -999,6 +999,12 @@ class SpeechGenerator(generator.Generator):
         if not self._script.utilities.cellRowChanged(obj):
             return []
 
+        if args.get('inMouseReview') and args.get('priorObj'):
+            thisrow, thiscol = self._script.utilities.coordinatesForCell(obj)
+            lastrow, lastcol = self._script.utilities.coordinatesForCell(args.get('priorObj'))
+            if thisrow == lastrow:
+                return []
+
         args['newOnly'] = True
         return self._generateRowHeader(obj, **args)
 
@@ -1019,6 +1025,12 @@ class SpeechGenerator(generator.Generator):
         if args.get('readingRow'):
             return []
 
+        if args.get('inMouseReview') and args.get('priorObj'):
+            thisrow, thiscol = self._script.utilities.coordinatesForCell(obj)
+            lastrow, lastcol = self._script.utilities.coordinatesForCell(args.get('priorObj'))
+            if thiscol == lastcol:
+                return []
+
         args['newOnly'] = True
         return self._generateColumnHeader(obj, **args)
 


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