Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java7
2 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java
index c9b0f9fb38..03ea34a51b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java
@@ -212,6 +212,7 @@ public void setImage (Image value) {
int oldHeaderHeight = parent.getHeaderHeight ();
parent.setHeaderImageHeight (value.getBounds ().height);
if (oldHeaderHeight != parent.getHeaderHeight ()) {
+ /* parent header height changed */
parent.header.redraw ();
parent.redraw ();
return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java
index ca394577f6..8253bcaed6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java
@@ -956,6 +956,7 @@ void removeItem (TreeItem item, int index) {
/* second condition below handles creation of item within Expand callback */
if (items.length == 0 && !parent.inExpand) {
expanded = false;
+ if (availableIndex == -1) return;
Rectangle bounds = getExpanderBounds (); /* expander box no longer needed */
parent.redraw (bounds.x, bounds.y, bounds.width, bounds.height, false);
}
@@ -983,6 +984,7 @@ public void setBackground (int columnIndex, Color value) {
if (cellBackgrounds [columnIndex] == value) return;
if (cellBackgrounds [columnIndex] != null && cellBackgrounds [columnIndex].equals (value)) return;
cellBackgrounds [columnIndex] = value;
+ if (availableIndex == -1) return;
Rectangle bounds = getCellBounds (columnIndex);
parent.redraw (bounds.x, bounds.y, bounds.width, bounds.height, false);
}
@@ -991,6 +993,7 @@ public void setChecked (boolean value) {
if ((parent.getStyle () & SWT.CHECK) == 0) return;
if (checked == value) return;
checked = value;
+ if (availableIndex == -1) return;
Rectangle bounds = getCheckboxBounds ();
parent.redraw (bounds.x, bounds.y, bounds.width, bounds.height, false);
}
@@ -1146,6 +1149,7 @@ public void setFont (int columnIndex, Font value) {
}
gc.dispose ();
+ if (availableIndex == -1) return;
Rectangle bounds = getCellBounds (columnIndex);
parent.redraw (bounds.x, bounds.y, bounds.width, bounds.height, false);
}
@@ -1172,6 +1176,7 @@ public void setForeground (int columnIndex, Color value) {
if (cellForegrounds [columnIndex] == value) return;
if (cellForegrounds [columnIndex] != null && cellForegrounds [columnIndex].equals (value)) return;
cellForegrounds [columnIndex] = value;
+ if (availableIndex == -1) return;
Rectangle bounds = getCellBounds (columnIndex);
parent.redraw (bounds.x, bounds.y, bounds.width, bounds.height, false);
}
@@ -1180,6 +1185,7 @@ public void setGrayed (boolean value) {
if ((parent.getStyle () & SWT.CHECK) == 0) return;
if (grayed == value) return;
grayed = value;
+ if (availableIndex == -1) return;
Rectangle bounds = getCheckboxBounds ();
parent.redraw (bounds.x, bounds.y, bounds.width, bounds.height, false);
}
@@ -1288,6 +1294,7 @@ public void setText (int columnIndex, String value) {
gc.setFont (getFont (columnIndex));
textWidths [columnIndex] = gc.textExtent (value).x;
gc.dispose ();
+ if (availableIndex == -1) return;
parent.redraw (
getTextX (columnIndex),
parent.getItemY (this),

Back to the top