summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2006-03-09 20:02:51 +0000
committerVeronika Irvine <veronika>2006-03-09 20:02:51 +0000
commite1018c34fdf8a97912dec934a5ee06a1df3a960e (patch)
treed7cee6114d223cc0d7c792a5659c1001331d6141 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
parentd422aeb81fcce56ad2295b9aca59cdb31ca2e5a5 (diff)
downloadeclipse.platform.swt-e1018c34fdf8a97912dec934a5ee06a1df3a960e.tar.gz
eclipse.platform.swt-e1018c34fdf8a97912dec934a5ee06a1df3a960e.tar.xz
eclipse.platform.swt-e1018c34fdf8a97912dec934a5ee06a1df3a960e.zip
Ignore what application does during event to be consistent across platforms.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index 4971b1cf11..4881618c44 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
@@ -460,9 +460,8 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
case OS.VK_RETURN:
Event event = new Event ();
event.item = item;
- boolean expand = !item.expanded;
- sendEvent (expand ? SWT.Expand : SWT.Collapse, event);
- item.expanded = expand;
+ sendEvent (item.expanded ? SWT.Collapse : SWT.Expand, event);
+ item.expanded = !item.expanded;
showItem (focusIndex);
return LRESULT.ZERO;
case OS.VK_UP:
@@ -521,9 +520,8 @@ LRESULT WM_LBUTTONUP (int wParam, int lParam) {
if (hover) {
Event event = new Event ();
event.item = item;
- boolean expand = !item.expanded;
- sendEvent (expand ? SWT.Expand : SWT.Collapse, event);
- item.expanded = expand;
+ sendEvent (item.expanded ? SWT.Collapse : SWT.Expand, event);
+ item.expanded = !item.expanded;
showItem (focusIndex);
}
return result;