Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352487

Summary: Mnemonic on label field does not work
Product: [Eclipse Project] Platform Reporter: Andreas Hoegger <Andreas.Hoegger>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: eclipse.felipe
Version: 3.7   
Target Milestone: 3.8 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test class to reproduce the described behavior.
none
Patch for all operating systems none

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.