[orca] Fix for Orca not presenting the row when a table regains focus
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for Orca not presenting the row when a table regains focus
- Date: Fri, 6 Dec 2013 14:12:01 +0000 (UTC)
commit 9e6f6c5f4fe091797a692668c42afa65ce4c5696
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Dec 6 15:11:24 2013 +0100
Fix for Orca not presenting the row when a table regains focus
src/orca/scripts/default.py | 5 ++++-
src/orca/scripts/toolkits/GAIL/script.py | 2 +-
src/orca/scripts/toolkits/gtk/script.py | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 2073dc7..d947923 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -754,6 +754,9 @@ class Script(script.Script):
row = table.getRowAtIndex(index)
self.pointOfReference['lastColumn'] = column
self.pointOfReference['lastRow'] = row
+ else:
+ self.pointOfReference['lastColumn'] = -1
+ self.pointOfReference['lastRow'] = -1
def locusOfFocusChanged(self, event, oldLocusOfFocus, newLocusOfFocus):
"""Called when the visual object with focus changes.
@@ -2421,7 +2424,7 @@ class Script(script.Script):
if obj.childCount:
selectedChildren = self.utilities.selectedChildren(obj)
- if len(selectedChildren) == 1:
+ if selectedChildren:
obj = selectedChildren[0]
orca.setLocusOfFocus(event, obj)
diff --git a/src/orca/scripts/toolkits/GAIL/script.py b/src/orca/scripts/toolkits/GAIL/script.py
index 9843420..d6d269b 100644
--- a/src/orca/scripts/toolkits/GAIL/script.py
+++ b/src/orca/scripts/toolkits/GAIL/script.py
@@ -73,7 +73,7 @@ class Script(default.Script):
if role == pyatspi.ROLE_TABLE:
obj = event.source
selectedChildren = self.utilities.selectedChildren(obj)
- if len(selectedChildren) == 1:
+ if selectedChildren:
obj = selectedChildren[0]
orca.setLocusOfFocus(event, obj)
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index cd1d823..9f3ef0a 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -107,7 +107,7 @@ class Script(default.Script):
if role == pyatspi.ROLE_TABLE:
obj = event.source
selectedChildren = self.utilities.selectedChildren(obj)
- if len(selectedChildren) == 1:
+ if selectedChildren:
obj = selectedChildren[0]
orca.setLocusOfFocus(event, obj)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]