Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2019-11-20 13:36:47 +0000
committerNiraj Modi2019-11-20 13:36:47 +0000
commit60423cd8832a3044b9715c664f8fc1a567aedaac (patch)
tree0353689a1927e060b7f2b5af7e3e3861492d81eb
parent5c664fd293b451a3716b44f7aaa0ef60eefb7333 (diff)
downloadeclipse.platform.swt-60423cd8832a3044b9715c664f8fc1a567aedaac.tar.gz
eclipse.platform.swt-60423cd8832a3044b9715c664f8fc1a567aedaac.tar.xz
eclipse.platform.swt-60423cd8832a3044b9715c664f8fc1a567aedaac.zip
Bug 349112 Part2 - CCombo: allow setting alignment SWT.RIGHT
Change-Id: Iacdfd1c1433f59eea421184cbf604da37f8c921f Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
index db9e9d5706..fdd7f0e312 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
@@ -210,10 +210,10 @@ void createText(Control parent, int style) {
text.setEnabled(enabled);
text.setEditable(editable);
if (focus) text.setFocus();
- if (font != null) text.setFont(font);
- if (fg != null) text.setForeground(fg);
- if (bg != null) text.setBackground(bg);
- if (menu != null) text.setMenu(menu);
+ if (font != null && !font.isDisposed()) text.setFont(font);
+ if (fg != null && !fg.isDisposed()) text.setForeground(fg);
+ if (bg != null && !bg.isDisposed()) text.setBackground(bg);
+ if (menu != null && !menu.isDisposed()) text.setMenu(menu);
internalLayout(true);
}

Back to the top