Bug 560162

Summary: GridLayout does not handle GridData.exclude correctly
Product: [Eclipse Project] Platform Reporter: Patrick Tasse <patrick.tasse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.15   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Patrick Tasse CLA 2020-02-14 11:26:00 EST
In GridLayout.layout(), a Control[] of children is built.

Any Control that has GridData.exclude==true is removed from this array, the subsequent controls are shifted down in the array, and the count is decremented.

But later when building the Control[][] grid, this exclusion is not taken into account.

So if the first Control in row 0, column 0 is excluded, then in the grid the Control in row 0, column 1 takes its place, and this second Control's layout data is used for the purposes of layout of the column 0.

Things do not end well.