[orca: 1/2] soffice: Do not announce selection changes from unfocused combo boxes



commit 0815b5bc561c87ed97f6f94e029423ded3903e85
Author: Colomban Wendling <cwendling hypra fr>
Date:   Tue Mar 19 11:50:42 2019 +0100

    soffice: Do not announce selection changes from unfocused combo boxes
    
    This is useful in LibreOffice 4.2 as the style toolbar updates when
    navigating the document, and its combo boxes emit the signals when they
    display the new value, leading to noise.

 src/orca/scripts/apps/soffice/script.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index a5aae3081..c54df028d 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -874,7 +874,9 @@ class Script(default.Script):
             return
 
         selectedChildren = self.utilities.selectedChildren(event.source)
-        if len(selectedChildren) == 1:
+        if len(selectedChildren) == 1 \
+           and self.utilities.containingComboBox(event.source) == \
+               self.utilities.containingComboBox(orca_state.locusOfFocus):
             orca.setLocusOfFocus(event, selectedChildren[0], True)
 
     def onTextSelectionChanged(self, event):


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