Bug 578622 - Tree Items are not painted if the Tree has Drag support and main Toolbar is hidden
Summary: Tree Items are not painted if the Tree has Drag support and main Toolbar is h...
Status: CLOSED DUPLICATE of bug 376936
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-07 10:39 EST by Phil Beauvoir CLA
Modified: 2022-02-08 06:56 EST (History)
2 users (show)

See Also:


Attachments
Sample View Project (4.68 KB, application/octet-stream)
2022-02-07 10:39 EST, Phil Beauvoir CLA
no flags Details
Screenshot of correct tree (3.77 KB, image/png)
2022-02-07 10:40 EST, Phil Beauvoir CLA
no flags Details
Screenshot of unpainted tree (3.13 KB, image/png)
2022-02-07 10:40 EST, Phil Beauvoir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2022-02-07 10:39:23 EST
Created attachment 287999 [details]
Sample View Project

Conditions:

1. Windows only
2. Eclipse Light or Dark Theme
3. A View with a TreeViewer that has drag support

Steps to reproduce:

1. Run a child Eclipse instance with the attached simple View project.
2. Select a tree item in the Sample View
3. Select another View in the workbench
4. So steps (2) and (3) enough times to see the behaviour

When focus is lost and regained, the Tree does not paint all tree items.

If the following line in SampleView is commented out, it's OK:

addDragSupport();

If the theme is changed to "Classic" or "System" it's also OK.

Some combination of Windows, a Theme and Drag support is causing this, but I don't know what.
Comment 1 Phil Beauvoir CLA 2022-02-07 10:40:09 EST
Created attachment 288000 [details]
Screenshot of correct tree
Comment 2 Phil Beauvoir CLA 2022-02-07 10:40:46 EST
Created attachment 288001 [details]
Screenshot of unpainted tree
Comment 3 Phil Beauvoir CLA 2022-02-07 10:43:07 EST
D'oh! I forgot to mention the most important factor here in Eclipse:

Window -> Appearance -> Hide Toolbar

This only happens if the main Toolbar is hidden.
Comment 4 Andrey Loskutov CLA 2022-02-07 10:46:52 EST
(In reply to Phil Beauvoir from comment #3)
> D'oh! I forgot to mention the most important factor here in Eclipse:
> 
> Window -> Appearance -> Hide Toolbar
> 
> This only happens if the main Toolbar is hidden.

I guess toolbar, if shown, triggers some extra updates on view sselections.

Just wondering : does it work if themes are completely disabled? In that case there should be not so many repaints.
Comment 5 Phil Beauvoir CLA 2022-02-07 10:48:49 EST
(In reply to Andrey Loskutov from comment #4)
> (In reply to Phil Beauvoir from comment #3)
> > D'oh! I forgot to mention the most important factor here in Eclipse:
> > 
> > Window -> Appearance -> Hide Toolbar
> > 
> > This only happens if the main Toolbar is hidden.
> 
> I guess toolbar, if shown, triggers some extra updates on view sselections.
> 
> Just wondering : does it work if themes are completely disabled? In that
> case there should be not so many repaints.

Yep, if themes are completely disabled it works.
Comment 6 Phil Beauvoir CLA 2022-02-07 10:51:39 EST
But very strange that adding viewer.addDragSupport() triggers the problem.
Comment 7 Rolf Theunissen CLA 2022-02-08 06:56:28 EST
Very old known issue, which is really messing up the view.
I did analyze it half a year ago, but still needs someone with time and priority to fix the issue.

*** This bug has been marked as a duplicate of bug 376936 ***