Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
1) TreeUtil.setOptimalWidthOnColumns try to process disposed widget when you click quickly
org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:4723)
at org.eclipse.swt.SWT.error(SWT.java:4638)
at org.eclipse.swt.SWT.error(SWT.java:4609)
at org.eclipse.swt.widgets.Widget.error(Widget.java:432)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:351)
at org.eclipse.swt.widgets.TreeItem.getFont(TreeItem.java:600)
at org.apache.hop.ui.core.widget.TreeUtil.getMaxWidths(Unknown Source)
at org.apache.hop.ui.core.widget.TreeUtil.setOptimalWidthOnColumns(TreeUtil.java:43)
at org.apache.hop.ui.core.vfs.HopVfsFileDialog.resizeTableColumn(HopVfsFileDialog.java:1211)
at org.apache.hop.ui.core.vfs.HopVfsFileDialog.lambda$11(HopVfsFileDialog.java:465)
private static final void getMaxWidths( TreeItem[] items, int[] max, GC gc, int level ) {
for ( int i = 0; i < items.length; i++ ) {
++ if (items[i].isDisposed() ) break;
2) The width of the column is not sufficient, seems to not take into account the level of nesting
Why not use method pack() + extra width ?
public class TreeUtil {
public static final void setOptimalWidthOnColumns(Tree tree) {
for (TreeColumn column : tree.getColumns())
}