Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-01-05 15:27:11 +0000
committerEric Williams2018-01-05 17:01:51 +0000
commitabf72f506e4a5fe10de601017e1872d66ffa6a8e (patch)
tree3f3215d76c216bc9fe536edff284a2c0074ddc6b
parent4720ffde2d239018671dc005d14eaa199c48b9d9 (diff)
downloadeclipse.platform.swt-abf72f506e4a5fe10de601017e1872d66ffa6a8e.tar.gz
eclipse.platform.swt-abf72f506e4a5fe10de601017e1872d66ffa6a8e.tar.xz
eclipse.platform.swt-abf72f506e4a5fe10de601017e1872d66ffa6a8e.zip
Bug 513761: [GTK3] Tree with columns and with CHECK and VIRTUAL styles
renders checkboxes in 2 columns Part of the fixes for bug 480261 involve re-creating Tree renderers when the SWT.VIRTUAL style is specified. This fix lead to a regression where checkboxes are rendered in the columns other than the first. This patch verifies that checkbox renderers are re-created only for the first column in the Tree, and does not break the fixes for bug 480261. Change-Id: Ia3ee77a476684e4ebad264387690505a2820aeb4 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index f7e3aff00c..ffc90ae789 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -1599,7 +1599,13 @@ public void setImage (int index, Image image) {
* bug 480261.
*/
if ((parent.style & SWT.VIRTUAL) != 0) {
- parent.createRenderers(column, modelIndex, ((parent.style & SWT.CHECK) != 0) , parent.style);
+ /*
+ * Only re-create SWT.CHECK renderers if this is the first column.
+ * Otherwise check-boxes will be rendered in columns they are not
+ * supposed to be rendered in. See bug 513761.
+ */
+ boolean check = modelIndex == Tree.FIRST_COLUMN && (parent.style & SWT.CHECK) != 0;
+ parent.createRenderers(column, modelIndex, check, parent.style);
}
}
}

Back to the top