[orca] Return early in allSelectedText() when entire document is selected
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Return early in allSelectedText() when entire document is selected
- Date: Fri, 18 Mar 2016 22:41:13 +0000 (UTC)
commit 7ee87175181ec51d80cb57f20b702c2a04cf689a
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Mar 18 18:37:28 2016 -0400
Return early in allSelectedText() when entire document is selected
In very large, multi-object documents, it is extremely non-performant
process each of individual objects. And we weren't going to present all
the selected text content anyway.
src/orca/script_utilities.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 50dea5c..31e03b2 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2121,6 +2121,8 @@ class Utilities:
"""
textContents, startOffset, endOffset = self.selectedText(obj)
+ if textContents and self._script.pointOfReference.get('entireDocumentSelected'):
+ return textContents, startOffset, endOffset
prevObj = self.findPreviousObject(obj)
while prevObj:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]