summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2002-05-28 18:54:47 +0000
committerVeronika Irvine <veronika>2002-05-28 18:54:47 +0000
commit1bdda2f66952666a5d534bd8c32c3f0cacf2f0b1 (patch)
treebe59661a444d5a9814a88b511f7d585e84dc6b4c /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
parent81ca82d45f9f24ea5ec38d7c3947d4e58ac9156f (diff)
downloadeclipse.platform.swt-1bdda2f66952666a5d534bd8c32c3f0cacf2f0b1.tar.gz
eclipse.platform.swt-1bdda2f66952666a5d534bd8c32c3f0cacf2f0b1.tar.xz
eclipse.platform.swt-1bdda2f66952666a5d534bd8c32c3f0cacf2f0b1.zip
Fix for 16775
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
index 1390f05653..4dc49052d1 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
@@ -201,12 +201,15 @@ public void deselectAll () {
/* Expand upward from the specified leaf item. */
void expandItem (TableTreeItem item) {
- if (item == null || item.getExpanded()) return;
+ if (item == null) return;
expandItem(item.parentItem);
- item.setExpanded(true);
- Event event = new Event();
- event.item = item;
- notifyListeners(SWT.Expand, event);
+ if (!item.getVisible()) item.setVisible(true);
+ if ( !item.expanded && item.items.length > 0) {
+ item.setExpanded(true);
+ Event event = new Event();
+ event.item = item;
+ notifyListeners(SWT.Expand, event);
+ }
}
public Color getBackground () {
// This method must be overriden otherwise, in a TableTree in which the first