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

Bug 581334

Summary: [GroupBy] GroupByHeaderLayer content scrolls without grid
Product: [Technology] NatTable Reporter: Dirk Fauth <dirk.fauth>
Component: GlazedLists ExtensionAssignee: Dirk Fauth <dirk.fauth>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.5   
Target Milestone: 2.1.0   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/199368
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=dc92fb91e111dc870972ea819349ffe6d555e1a4
Whiteboard:

Description Dirk Fauth CLA 2023-01-12 03:39:23 EST
If you create a composition that only has a body and a column header together with a GroupByHeaderLayer, the content of the GroupByHeaderLayer scrolls if the body is scrolled. This does not happen if the GroupByHeaderLayer is placed on top of a GridLayer.

The reason is the x of the bounds that are passed to the GroupByHeaderPainter. If the GroupByHeaderLayer is dimensionally dependent to a GridLayer, the value is always 0, as the grid with a row header always starts at x = 0. If the dimensionally dependency is only a CompositeLayer with column header and body, the x can become negative on scrolling.

The fix is simply to set the bounds.x to 0 if it has a negative value.
Comment 1 Eclipse Genie CLA 2023-01-12 03:41:17 EST
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/199368
Comment 3 Dirk Fauth CLA 2023-03-31 03:48:33 EDT
Fixed with 2.1.0