aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index 9c030fc407..9d6d4b0ff6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -1288,12 +1288,16 @@ void initAccessible() {
final Accessible accessible = getAccessible();
accessible.addAccessibleListener(new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
- String name = null;
+ CTabItem item = null;
int childID = e.childID;
- if (childID >= 0 && childID < items.length) {
- name = stripMnemonic(items[childID].getText());
+ if (childID == ACC.CHILDID_SELF) {
+ if (selectedIndex != -1) {
+ item = items[selectedIndex];
+ }
+ } else if (childID >= 0 && childID < items.length) {
+ item = items[childID];
}
- e.result = name;
+ e.result = item == null ? null : stripMnemonic(item.getText());
}
public void getHelp(AccessibleEvent e) {