[orca] Calc: Eliminate chattiness from the table reclaiming focus after editing cell



commit f0ed4122abfb9389b0e85e89caaaf98ca924d20b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Mar 3 13:38:27 2020 +0100

    Calc: Eliminate chattiness from the table reclaiming focus after editing cell

 src/orca/scripts/apps/soffice/script.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index c54df028d..611c33e1c 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -775,6 +775,19 @@ class Script(default.Script):
                 orca.setLocusOfFocus(event, event.source, False)
                 return
 
+        if self.utilities.isSpreadSheetTable(event.source) and orca_state.locusOfFocus:
+            if self.utilities.isDead(orca_state.locusOfFocus):
+                msg = "SOFFICE: Event believed to be post-editing focus claim. Dead locusOfFocus."
+                debug.println(debug.LEVEL_INFO, msg, True)
+                orca.setLocusOfFocus(event, event.source, False)
+                return
+
+            if  orca_state.locusOfFocus.getRole() in [pyatspi.ROLE_PARAGRAPH, pyatspi.ROLE_TABLE_CELL]:
+                msg = "SOFFICE: Event believed to be post-editing focus claim based on role."
+                debug.println(debug.LEVEL_INFO, msg, True)
+                orca.setLocusOfFocus(event, event.source, False)
+                return
+
         default.Script.onFocusedChanged(self, event)
 
     def onCaretMoved(self, event):


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