[orca] Update our cached text selection and state when entire doc becomes unselected



commit 3cc134cc2811738dc9d178bb4732bc821ce53e63
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jan 15 17:13:03 2016 -0500

    Update our cached text selection and state when entire doc becomes unselected

 src/orca/script_utilities.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index a0e7fa8..86736ee 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -3409,6 +3409,12 @@ class Utilities:
             debug.println(debug.LEVEL_INFO, msg, True)
             text = None
 
+        if self._script.pointOfReference.get('entireDocumentSelected'):
+            selectedText, selectedStart, selectedEnd = self.allSelectedText(obj)
+            if not selectedText:
+                self._script.pointOfReference['entireDocumentSelected'] = False
+                self._script.pointOfReference['textSelections'] = {}
+
         # TODO: JD - this doesn't yet handle the case of multiple non-contiguous
         # selections in a single accessible object.
         textSelections = self._script.pointOfReference.get('textSelections', {})


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