[pyatspi2: 1/2] Make Selection#clearSelection work




commit 5e96a16d8c250c5e5a0a1e89588c00bca963d055
Author: Michael Weghorn <m weghorn posteo de>
Date:   Wed Oct 20 16:08:18 2021 +0200

    Make Selection#clearSelection work
    
    Call the corresponding 'Atspi.Selection' method.
    
    Forwarding to 'Atspi.Text' instead looks like that might
    have been a copy-paste error and e.g. resulted in
    
        AttributeError: type object 'Text' has no attribute 'clear_selection'
    
    when calling
    
       sel.clearSelection()
    
    on a 'pyatspi.selection.Selection' object in Accerciser's
    IPython console.

 pyatspi/selection.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pyatspi/selection.py b/pyatspi/selection.py
index 17cb0e0f..fc19995c 100644
--- a/pyatspi/selection.py
+++ b/pyatspi/selection.py
@@ -42,7 +42,7 @@ class Selection(interface):
                 @return True if the selections were successfully cleared, False
                 otherwise.
                 """
-                return Atspi.Text.clear_selection(self.obj)
+                return Atspi.Selection.clear_selection(self.obj)
 
         def deselectChild(self, childIndex):
                 """


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