| Summary: | AutoResizeColumnCommandHandler might skip the TurnViewportOnCommand | ||
|---|---|---|---|
| Product: | [Technology] NatTable | Reporter: | Gerhard Kreuzer <gerhard.kreuzer> |
| Component: | Core | Assignee: | Project Inbox <nattable.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dirk.fauth, gerhard.kreuzer |
| Version: | 2.0.2 | ||
| Target Milestone: | 2.0.4 | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| See Also: |
https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/196084 https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=1aa3202e7759dd103eebce3188ebfc9a96ced6a1 |
||
| Whiteboard: | |||
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/196084 Gerrit change https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/196084 was merged to [master]. Commit: http://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=1aa3202e7759dd103eebce3188ebfc9a96ced6a1 Yes I share your opinion. If the viewport is always turned off, it should always be turned on again. Released with 2.0.4 |
From AutoResizeColumnCommandHandler (lines 97 to 103): // only perform further actions if the widths could be calculated // could fail and return null for example if the GCFactory fails if (gridColumnWidths != null && gridColumnWidths.length > 0) { this.commandLayer.doCommand( new MultiColumnResizeCommand(this.commandLayer, gridColumnPositions, gridColumnWidths, true)); targetLayer.doCommand(new TurnViewportOnCommand()); } In my opinion, the TurnViewportOnCommand should not be controlled by the if clause, but executed anyway, because the viewport was unconditionally turned off as first operation in the doCommand() method.