diff options
author | Grant Gayed <ggayed> | 2004-11-24 21:50:33 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2004-11-24 21:50:33 +0000 |
commit | 7307987de72dea638b2a5185ca18fbab3232c449 (patch) | |
tree | 1ab81bd215e47ddaf8a28d6038adfebe74fc7e0b /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java | |
parent | d32cdc97539fa1be94823928c736d47b4c9d4696 (diff) | |
download | eclipse.platform.swt-7307987de72dea638b2a5185ca18fbab3232c449.tar.gz eclipse.platform.swt-7307987de72dea638b2a5185ca18fbab3232c449.tar.xz eclipse.platform.swt-7307987de72dea638b2a5185ca18fbab3232c449.zip |
79423
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java index 641f6005ed..e5376b1544 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java @@ -494,18 +494,24 @@ Point minimumSize (int wHint, int hHint, boolean flushCache) { boolean mnemonicHit (char key) { int itemCount = getItemCount (); + int selection = getSelectionIndex (); for (int i=0; i<itemCount; i++) { - int /*long*/ labelHandle = items [i].labelHandle; - if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; + if (i != selection) { + int /*long*/ labelHandle = items [i].labelHandle; + if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; + } } return false; } boolean mnemonicMatch (char key) { int itemCount = getItemCount (); + int selection = getSelectionIndex (); for (int i=0; i<itemCount; i++) { - int /*long*/ labelHandle = items [i].labelHandle; - if (labelHandle != 0 && mnemonicMatch (labelHandle, key)) return true; + if (i != selection) { + int /*long*/ labelHandle = items [i].labelHandle; + if (labelHandle != 0 && mnemonicHit (labelHandle, key)) return true; + } } return false; } |