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

Bug 335307

Summary: Redraw problem with Table/Tree header after scrolling
Product: [Eclipse Project] Platform Reporter: Lakshmi P Shanmugam <lshanmug>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: RESOLVED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: normal    
Priority: P3 CC: eclipse.felipe
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
patch none

Description Lakshmi P Shanmugam CLA 2011-01-25 08:25:44 EST
Reproducible on Cocoa I20110124-1800 build.

I first saw this in the preference dialog -> Installed JREs.
Also reproducible with Tree and Table in Control Example.

Steps:
1) Open preference dialog -> Installed JREs
2) Scroll towards the right in the Installed JREs table such that the checkbox column is not visible.
3) Now scroll back so that checkbox column is visible.
4) The text in the header of first column ("Name") is not redrawn correctly.
Comment 1 Lakshmi P Shanmugam CLA 2011-04-20 09:37:39 EDT
Created attachment 193695 [details]
patch

The patch tries to redraw the first column header when the checkbox column is scrolled.
Silenio, can you please review the patch?
Comment 2 Silenio Quarti CLA 2011-04-21 14:40:07 EDT
Patch is ok.

I would consider not having the boolean "headerVisible" and detect visibility the same way getHeaderVisible() does. It is up to you.

if ((style & SWT.CHECK) != 0 && columnCount > 0 && ((NSTableView)view).headerView() != null) {
Comment 3 Lakshmi P Shanmugam CLA 2011-04-25 06:14:33 EDT
Removed 'headerVisible' and committed the patch. I had used the variable because the scrollClipViewToPoint() is called repeatedly while scrolling.

Fixed in HEAD > 20110425. Thanks Silenio!