Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334735 - the highlight row and focus row on different line
Summary: the highlight row and focus row on different line
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 00:44 EST by yanghang CLA
Modified: 2011-03-18 11:49 EDT (History)
5 users (show)

See Also:


Attachments
sample code (3.57 KB, application/zip)
2011-01-19 00:45 EST, yanghang CLA
no flags Details
screen shot (28.07 KB, image/jpeg)
2011-01-19 00:46 EST, yanghang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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().