Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335307 - Redraw problem with Table/Tree header after scrolling
Summary: Redraw problem with Table/Tree header after scrolling
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Lakshmi P Shanmugam CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 08:25 EST by Lakshmi P Shanmugam CLA
Modified: 2011-04-25 06:14 EDT (History)
1 user (show)

See Also:


Attachments
patch (3.52 KB, patch)
2011-04-20 09:37 EDT, Lakshmi P Shanmugam CLA
no flags Details | Diff

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