Bug 573050 - [Win32] Separator Label vanishes forever when disabled
Change-Id: I721bfcff1b2458069309e868c5436c9541f0454b
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/179721
Tested-by: Platform Bot <platform-bot@eclipse.org>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index ac4aab6..4ae061c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -319,6 +319,7 @@
@Override
public void setEnabled (boolean enabled) {
+ if ((style & SWT.SEPARATOR) != 0) return;
/*
* Style may need to be changed if Display#disabledLabelForegroundPixel
* is active. At the same time, #setEnabled() will cause a repaint with