[orca] Fix regression in the combobox generation code



commit a6d740f96c6267a49e33630d0814d963f6d08df3
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Apr 12 13:48:39 2020 -0400

    Fix regression in the combobox generation code
    
    Some comboboxes have a name based on its value rather than on the
    associated label. So don't check for that condition in the generator
    and instead try to identify when the name is not based on the value
    in the script utilities.

 src/orca/generator.py        | 2 --
 src/orca/script_utilities.py | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index d21c8ee14..4f24e4308 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -1021,8 +1021,6 @@ class Generator:
         role = args.get('role', obj.getRole())
         if role == pyatspi.ROLE_COMBO_BOX:
             value = self._script.utilities.getComboBoxValue(obj)
-            if value == obj.name:
-                return []
             return [value]
 
         return [self._script.utilities.textForValue(obj)]
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 260b4f9db..5bf4e51c8 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -551,7 +551,7 @@ class Utilities:
             if self.EMBEDDED_OBJECT_CHARACTER in displayedText:
                 displayedText = None
 
-        if not displayedText:
+        if not displayedText and role != pyatspi.ROLE_COMBO_BOX:
             # TODO - JD: This should probably get nuked. But all sorts of
             # existing code might be relying upon this bogus hack. So it
             # will need thorough testing when removed.


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