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

Bug 581248

Summary: Hover styling does not work for header regions when scrolled
Product: [Technology] NatTable Reporter: Dirk Fauth <dirk.fauth>
Component: CoreAssignee: Dirk Fauth <dirk.fauth>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.4   
Target Milestone: 2.1.0   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/197732
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=92613cd8eb2cdb9df18c02aa1e7ead3a2aeeb79c
https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/197762
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=a493cfbb8e00fd4110f9cfb20b60b15ff9e82c03
https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/197765
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=635111fbf2b828d9c7b797de5ce95c4644ace145
Whiteboard:

Description Dirk Fauth CLA 2022-12-19 05:57:47 EST
The CellVisualUpdateEvent contains incorrect values for column and row position for the header regions if the NatTable is scrolled. The reason is that the conversion of the position is dimensionally dependent, which means the position is dependent on the horizontal or vertical layer dependency. But it is not possible to directly convert from the underlying to the local layer, as the underlying conversion does only work inside a layer stack upwards.

To handle this it is necessary to first convert the position to index, and then use the ViewportLayer in the dimensional dependency to get the position from the index again.
Comment 1 Eclipse Genie CLA 2022-12-19 06:01:47 EST
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/197732
Comment 3 Eclipse Genie CLA 2022-12-20 09:44:48 EST
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/197762
Comment 4 Dirk Fauth CLA 2022-12-20 09:56:56 EST
Unfortunately the fix was not sufficient. To make hover styling in the header regions working correctly an API change is needed. For the headers it is necessary to 
a) fire the command with indexes instead of positions
b) transform the positions in the event based in IUniqueIndexLayer and not ViewportLayer, otherwise compositions with a BodyLayerStack will also not work.

Note that a BodyLayerStack will need to extend AbstractIndexLayerTransform for this.

The fix will be published with a 2.1.0 because of the API changes.
Comment 6 Eclipse Genie CLA 2022-12-20 10:07:24 EST
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/197765
Comment 8 Dirk Fauth CLA 2023-03-31 03:50:37 EDT
Fixed with 2.1.0