diff options
author | Veronika Irvine <veronika> | 2006-01-26 17:08:36 +0000 |
---|---|---|
committer | Veronika Irvine <veronika> | 2006-01-26 17:08:36 +0000 |
commit | 6671b08ea3a9774efb848e8b9d6b69601c057115 (patch) | |
tree | 8c095397a0e73161941a9c1854e280fe7903ef75 | |
parent | beecd7a2552d57d125d8ad15805be74945ef3111 (diff) | |
download | eclipse.platform.swt-6671b08ea3a9774efb848e8b9d6b69601c057115.tar.gz eclipse.platform.swt-6671b08ea3a9774efb848e8b9d6b69601c057115.tar.xz eclipse.platform.swt-6671b08ea3a9774efb848e8b9d6b69601c057115.zip |
expand event must come before expand state changes
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragUnderEffect.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragUnderEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragUnderEffect.java index 53fef8bbc4..eee62a9be1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragUnderEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragUnderEffect.java @@ -102,6 +102,7 @@ TreeItem previousItem(TreeItem item) { void show(int effect, int x, int y) { effect = checkEffect(effect); TreeItem item = (TreeItem)getItem(x, y); + if ((effect & DND.FEEDBACK_EXPAND) == 0) { expandBeginTime = 0; expandIndex = null; @@ -109,16 +110,14 @@ void show(int effect, int x, int y) { if (item != null && item.equals(expandIndex) && expandBeginTime != 0) { if (System.currentTimeMillis() >= expandBeginTime) { if (item.getItemCount() > 0 && !item.getExpanded()) { + Event event = new Event(); + event.x = x; + event.y = y; + event.item = item; + event.time = (int) System.currentTimeMillis(); + tree.notifyListeners(SWT.Expand, event); + if (item.isDisposed()) return; item.setExpanded(true); - if (item.getExpanded()) { - Event event = new Event(); - event.x = x; - event.y = y; - event.item = item; - event.time = (int) System.currentTimeMillis(); - tree.notifyListeners(SWT.Expand, event); - if (item.isDisposed()) return; - } } expandBeginTime = 0; expandIndex = null; |