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

Bug 334735

Summary: the highlight row and focus row on different line
Product: [Eclipse Project] Platform Reporter: yanghang
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: kleind, mpcarl, mukund, pwebster, Silenio_Quarti
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
sample code
none
screen shot none

Description yanghang CLA 2011-01-19 00:44:36 EST
Build Identifier: SWT3.6.1

run my sample, select one row, and click column to sort, you will see  the highlight row and focus row on different line

Reproducible: Always

Steps to Reproduce:
1. run my sample TableSample
2. select the second line
3. click the last name column to sort

Bug:
the highlight row and focus row on different line
Comment 1 yanghang CLA 2011-01-19 00:45:37 EST
Created attachment 187076 [details]
sample code
Comment 2 yanghang CLA 2011-01-19 00:46:14 EST
Created attachment 187077 [details]
screen shot
Comment 3 David Klein CLA 2011-03-04 14:55:26 EST
This defect is an accessibility compliance issue for our product.  Is there any information regarding this behavior?
Comment 4 Silenio Quarti CLA 2011-03-16 15:37:33 EDT
Felipe, please investigate this problem.
Comment 5 Felipe Heidrich CLA 2011-03-18 11:49:05 EDT
this is not a SWT Bug.

By default a TableViewer calls table#select() to restore the selection. This call only sets the selection but does not set the focus item.
Note that the selection and the focus item are not always the same item. You can change the focus item by holding the control key down and moving the focus using the up and down arrow key.

All you have to do is, in the selection listerner for the columns, call viewer.refresh(true, true) instead of just viewer.refresh().