summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2010-10-05 09:21:52 (EDT)
committerSteffen Kriese2010-10-05 09:21:52 (EDT)
commitb4cecf4cd44f167b6aaadc2484e81fc2bac7c4ed (patch)
tree42e1902738e92166c6e5f9dc31fb8d724531a6a5
parent0c5ff93a9e7e58fffa179ef9a2de7d5f64df406a (diff)
downloadorg.eclipse.riena-b4cecf4cd44f167b6aaadc2484e81fc2bac7c4ed.zip
org.eclipse.riena-b4cecf4cd44f167b6aaadc2484e81fc2bac7c4ed.tar.gz
org.eclipse.riena-b4cecf4cd44f167b6aaadc2484e81fc2bac7c4ed.tar.bz2
Added isDisposed-checks in CompletionCombo to prevent tests from failing
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java
index 5ba0edf..4c23bfd 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java
@@ -42,6 +42,7 @@ import org.eclipse.swt.widgets.Widget;
import org.eclipse.riena.ui.swt.facades.ClipboardFacade;
import org.eclipse.riena.ui.swt.facades.SWTFacade;
+import org.eclipse.riena.ui.swt.utils.SwtUtilities;
/**
* TODO [ev] docs
@@ -1126,7 +1127,7 @@ public abstract class CompletionCombo extends Composite {
* @since 3.0
*/
protected boolean isDropped() {
- return popup.getVisible();
+ return !SwtUtilities.isDisposed(popup) && popup.getVisible();
}
@Override
@@ -1315,7 +1316,8 @@ public abstract class CompletionCombo extends Composite {
super.redraw();
text.redraw();
arrow.redraw();
- if (popup.isVisible()) {
+
+ if (!SwtUtilities.isDisposed(popup) && popup.isVisible()) {
list.redraw();
}
}
@@ -1554,7 +1556,7 @@ public abstract class CompletionCombo extends Composite {
text.setEnabled(enabled);
final boolean editable = enabled && text.getEditable();
arrow.setEnabled(editable);
- if (!editable) {
+ if (!editable && !SwtUtilities.isDisposed(popup)) {
popup.setVisible(editable);
}
}