summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-06-20 16:58:22 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-06-20 16:58:22 -0400
commitd62ca75a93db110199fc4bd6eaf1279a676d827b (patch)
tree5e90f3b85c56d6f9c86419b5d382024b11c69e2d
parentde39ec30a29f6ea7488b95a176a7772391db46ae (diff)
downloadeclipse.platform.swt-d62ca75a93db110199fc4bd6eaf1279a676d827b.tar.gz
eclipse.platform.swt-d62ca75a93db110199fc4bd6eaf1279a676d827b.tar.xz
eclipse.platform.swt-d62ca75a93db110199fc4bd6eaf1279a676d827b.zip
Bug 164033 - Tree#setSelection() is sending out Expand-Events
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index 26663c457c..e379bf5a7c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -3183,7 +3183,12 @@ void showItem (TreeItem item, boolean scroll) {
TreeItem parentItem = item.parentItem;
if (parentItem != null) {
showItem (parentItem, false);
- parentItem.setExpanded (true);
+ if (!parentItem.getExpanded()) {
+ parentItem.setExpanded (true);
+ Event event = new Event ();
+ event.item = parentItem;
+ sendEvent (SWT.Expand, event);
+ }
}
if (scroll) {
NSOutlineView outlineView = (NSOutlineView) view;