| Summary: | Tree collapse doesn't work with big spanning | ||
|---|---|---|---|
| Product: | [Technology] NatTable | Reporter: | Vincent Sennedot <vincent.sennedot> |
| Component: | Core | Assignee: | Dirk Fauth <dirk.fauth> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dirk.fauth |
| Version: | 2.0.3 | ||
| Target Milestone: | 2.0.4 | ||
| Hardware: | PC | ||
| OS: | Windows 11 | ||
| See Also: |
https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/195557 https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=bafe75cd93b8e9addd27d689d75db0ee59ef285c |
||
| Whiteboard: | |||
|
Description
Vincent Sennedot
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/195557 Gerrit change https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/195557 was merged to [master]. Commit: http://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=bafe75cd93b8e9addd27d689d75db0ee59ef285c I have added a handling that should cover that special case. For a better error description if anyone comes across this in the future: The issue happens only if - the tree cell has a row spanning - the tree handle is not in the top - the origin row is outside the visible area The TreeExpandCollapseAction is a IMouseAction so it only knows the NatTable and the clicked position. So it is impossible for the action to retrieve the row index of the origin row if it is not visible. By default the tree handle is on top of a row spanned cell, so if the top row is not visible, the handle is not visible and therefore the issue can not occur. To fix the issue the clicked row index is passed as a negative value. With this indication the command handler should be able to know that not the origin row was clicked, but some other row of the spanning, and that now the origin row index needs to be determined. Probably passing the row position instead of the index would be a cleaner approach, but that would mean to change the API from index handling to position handling, which would have a bigger impact overall. Could you please verify with the latest SNAPSHOT build if everything now works as expected? Thank you for the correction, it seems to work! But while testing, I found another bug with the expand/collapse for a parent with only one child. In the same example, the McLaren row has not the button to expand/collapse, but if you click at the position where the button could be, it appears and if you click again, an exception is thrown. Thanks for testing. I have created https://bugs.eclipse.org/bugs/show_bug.cgi?id=580698 to track the new found error. Released with 2.0.4 |