Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2015-05-07 09:23:54 +0000
committerEd Merks2015-05-07 09:23:54 +0000
commitb8dee398397070e14a3651a38eae713763cf449a (patch)
tree596351d18e2ffcf1631492a52e1857a6f0fbb881
parentcb06406f97a9b2afd325c0c9ae52eaaae23eb60e (diff)
downloadorg.eclipse.oomph-b8dee398397070e14a3651a38eae713763cf449a.tar.gz
org.eclipse.oomph-b8dee398397070e14a3651a38eae713763cf449a.tar.xz
org.eclipse.oomph-b8dee398397070e14a3651a38eae713763cf449a.zip
[466699] ConfirmationPage: SWTException in Tree.setRedraw (2979)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=466699
-rw-r--r--plugins/org.eclipse.oomph.setup.ui/src/org/eclipse/oomph/setup/ui/wizards/ConfirmationPage.java39
1 files changed, 21 insertions, 18 deletions
diff --git a/plugins/org.eclipse.oomph.setup.ui/src/org/eclipse/oomph/setup/ui/wizards/ConfirmationPage.java b/plugins/org.eclipse.oomph.setup.ui/src/org/eclipse/oomph/setup/ui/wizards/ConfirmationPage.java
index 6dc11c9f6..267f374de 100644
--- a/plugins/org.eclipse.oomph.setup.ui/src/org/eclipse/oomph/setup/ui/wizards/ConfirmationPage.java
+++ b/plugins/org.eclipse.oomph.setup.ui/src/org/eclipse/oomph/setup/ui/wizards/ConfirmationPage.java
@@ -619,33 +619,36 @@ public class ConfirmationPage extends SetupWizardPage
@Override
public void controlResized(ControlEvent e)
{
- try
+ if (!tree.isDisposed())
{
- tree.setRedraw(false);
+ try
+ {
+ tree.setRedraw(false);
- Rectangle clientArea = tree.getClientArea();
- int clientWidth = clientArea.width - clientArea.x;
+ Rectangle clientArea = tree.getClientArea();
+ int clientWidth = clientArea.width - clientArea.x;
- // We get events during setInput where the tree items are disposed because the view is empty and then the column can't be packed.
- TreeItem[] items = tree.getItems();
- if (items.length > 0 && !items[0].isDisposed())
- {
- column.pack();
- int width = column.getWidth();
- if (width < clientWidth)
+ // We get events during setInput where the tree items are disposed because the view is empty and then the column can't be packed.
+ TreeItem[] items = tree.getItems();
+ if (items.length > 0 && !items[0].isDisposed())
+ {
+ column.pack();
+ int width = column.getWidth();
+ if (width < clientWidth)
+ {
+ column.setWidth(clientWidth);
+ }
+ }
+ else
{
column.setWidth(clientWidth);
}
+
}
- else
+ finally
{
- column.setWidth(clientWidth);
+ tree.setRedraw(true);
}
-
- }
- finally
- {
- tree.setRedraw(true);
}
}
};

Back to the top