summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2006-01-26 17:08:36 +0000
committerVeronika Irvine <veronika>2006-01-26 17:08:36 +0000
commit6671b08ea3a9774efb848e8b9d6b69601c057115 (patch)
tree8c095397a0e73161941a9c1854e280fe7903ef75 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org
parentbeecd7a2552d57d125d8ad15805be74945ef3111 (diff)
downloadeclipse.platform.swt-6671b08ea3a9774efb848e8b9d6b69601c057115.tar.gz
eclipse.platform.swt-6671b08ea3a9774efb848e8b9d6b69601c057115.tar.xz
eclipse.platform.swt-6671b08ea3a9774efb848e8b9d6b69601c057115.zip
expand event must come before expand state changes
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragUnderEffect.java17
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;