Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java6
1 files changed, 5 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 b9651dea07..9552ddb490 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
@@ -295,9 +295,13 @@ void clear () {
if (parent.currentItem == this) return;
if (cached || (parent.style & SWT.VIRTUAL) == 0) {
int columnCount = OS.gtk_tree_model_get_n_columns (parent.modelHandle);
- for (int i=Tree.CHECKED_COLUMN; i<columnCount; i++) {
+ /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+ for (int i=Tree.CHECKED_COLUMN; i<Tree.FOREGROUND_COLUMN; i++) {
OS.gtk_tree_store_set (parent.modelHandle, handle, i, 0, -1);
}
+ for (int i=Tree.FOREGROUND_COLUMN; i<columnCount; i++) {
+ OS.gtk_tree_store_set (parent.modelHandle, handle, i, (int /*long*/)0, -1);
+ }
/*
* Bug in GTK. When using fixed-height-mode,
* row changes do not cause the row to be repainted. The fix is to

Back to the top