Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352487 - Mnemonic on label field does not work
Summary: Mnemonic on label field does not work
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.8 M1   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 12:24 EDT by Andreas Hoegger CLA
Modified: 2011-08-24 10:32 EDT (History)
1 user (show)

See Also:


Attachments
Test class to reproduce the described behavior. (1.39 KB, text/x-java)
2011-07-19 12:24 EDT, Andreas Hoegger CLA
no flags Details
Patch for all operating systems (4.93 KB, patch)
2011-07-19 12:25 EDT, Andreas Hoegger CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Hoegger CLA 2011-07-19 12:24:42 EDT
Created attachment 199917 [details]
Test class to reproduce the described behavior.

Mnemonics on labels are implemented to set the focus to the next focus-able control. This works fine if in the same composite is a focus-able control. If not the mnemonic gets ignored.

Responsible for this bug is the 'Label.mnemonicHit' method which checks the index against this also in parent composites.

See also attached 'MnemonicLabelTest.java'.
Comment 1 Andreas Hoegger CLA 2011-07-19 12:25:59 EDT
Created attachment 199918 [details]
Patch for all operating systems
Comment 2 Felipe Heidrich CLA 2011-07-19 13:37:06 EDT
good catch, I will test/review/relase the patch today.
Comment 3 Felipe Heidrich CLA 2011-07-19 14:26:37 EDT
please test it
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=caaf50eaf0e8d931eaa9f3e9c353662760983ea0

i changed the code a bit to use only one local variable and removed the code fro qt and mofit (as we are not supporting them anymore).
Comment 4 Felipe Heidrich CLA 2011-07-19 14:27:03 EDT
and thank you very much for the patch!
Comment 5 Andreas Hoegger CLA 2011-07-19 15:45:03 EDT
+1 Thank you Felipe.