summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2005-03-23 21:12:33 +0000
committerGrant Gayed <ggayed>2005-03-23 21:12:33 +0000
commit179e1e8feb58af613b2d9e2d8a1b0f959cbc3d62 (patch)
tree2ec3e455faf7a6b3281419744bee76e6c8195b6b
parent5fd4bfa1377c129093915acfce3927743f235276 (diff)
downloadeclipse.platform.swt-179e1e8feb58af613b2d9e2d8a1b0f959cbc3d62.tar.gz
eclipse.platform.swt-179e1e8feb58af613b2d9e2d8a1b0f959cbc3d62.tar.xz
eclipse.platform.swt-179e1e8feb58af613b2d9e2d8a1b0f959cbc3d62.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
index a7d74339ce..df312e2d2e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
@@ -2799,8 +2799,7 @@ public void showColumn (TreeColumn column) {
int x = column.getX ();
int rightX = x + column.width;
Rectangle bounds = getClientArea ();
- int boundsRight = bounds.x + bounds.width;
- if (bounds.x <= x && rightX <= boundsRight) return; /* column is fully visible */
+ if (0 <= x && rightX <= bounds.width) return; /* column is fully visible */
int absX = 0; /* the X of the column irrespective of the horizontal scroll */
for (int i = 0; i < column.getIndex (); i++) {
@@ -2809,10 +2808,11 @@ public void showColumn (TreeColumn column) {
if (x < bounds.x) { /* column is to left of viewport */
horizontalOffset = absX;
} else {
- horizontalOffset = boundsRight - absX;
+ horizontalOffset = absX + column.width - bounds.width;
}
getHorizontalBar ().setSelection (horizontalOffset);
redraw ();
+ if (header.isVisible ()) header.redraw ();
}
/**
* Shows the item. If the item is already showing in the receiver,
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 f6ef08a2c5..77e7db0f4e 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
@@ -401,11 +401,11 @@ public void pack () {
TreeItem[] availableItems = parent.availableItems;
if (availableItems.length == 0) return;
int index = getIndex ();
- int width = getPreferredWidth ();
+ int newWidth = getPreferredWidth ();
for (int i = 0; i < availableItems.length; i++) {
- width = Math.max (width, availableItems [i].getPreferredWidth (index));
+ newWidth = Math.max (newWidth, availableItems [i].getPreferredWidth (index));
}
- parent.updateColumnWidth (this, width);
+ if (newWidth != width) parent.updateColumnWidth (this, newWidth);
}
/**
* Removes the listener from the collection of listeners who will
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 d9a7f510dd..2f31f608f5 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
@@ -2056,7 +2056,7 @@ public void setImage (int columnIndex, Image value) {
}
gc.dispose ();
parent.redraw (
- 0, 0,
+ columns [0].getX (), 0,
columns [0].width,
parent.getClientArea ().height,
true);