aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Rahn2014-01-30 10:40:07 (EST)
committerNicholas Rahn2014-01-30 10:40:07 (EST)
commit95971e774611a9838bed5f690400628c06202d87 (patch)
treeeb8fc2d491d291abf9b504912fc23074e1d98731
parentc884b66e531b9a1d486222abb7398209773b1948 (diff)
downloadeclipse.platform.swt-95971e774611a9838bed5f690400628c06202d87.zip
eclipse.platform.swt-95971e774611a9838bed5f690400628c06202d87.tar.gz
eclipse.platform.swt-95971e774611a9838bed5f690400628c06202d87.tar.bz2
Bug 425180: Add missing support for TreeColumn packing with SWT.VIRTUAL trees.refs/changes/44/21344/1
Signed-off-by: Nicholas Rahn <nick@transparentech.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
index 0315341..4b475a2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
@@ -434,7 +434,12 @@ public void pack () {
width = requisition.width;
}
if ((parent.style & SWT.VIRTUAL) != 0) {
- //NOT DONE
+ for (int i=0; i<parent.items.length; i++) {
+ TreeItem item = parent.items [i];
+ if (item != null && item.cached) {
+ width = Math.max (width, parent.calculateWidth (handle, item.handle, true));
+ }
+ }
} else {
long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) {