[orca] Use the script's method to query the text interface in displayedText()



commit 161b7313fcc73962334016a53214668493a4113a
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue May 21 15:48:43 2019 +0200

    Use the script's method to query the text interface in displayedText()
    
    Otherwise we're in danger of returning a string for objects that the script
    doesn't think should have a string and will fail to use the more-presentable
    name.

 src/orca/script_utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index a6e62187d..b829629de 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -530,7 +530,7 @@ class Utilities:
             return name
 
         try:
-            text = obj.queryText()
+            text = self.queryNonEmptyText(obj)
             displayedText = text.getText(0, text.characterCount)
         except:
             pass


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