summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
diff options
context:
space:
mode:
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