diff options
author | Lakshmi Shanmugam <lshanmug@in.ibm.com> | 2012-10-08 17:29:38 +0530 |
---|---|---|
committer | Lakshmi Shanmugam <lshanmug@in.ibm.com> | 2012-10-08 17:29:38 +0530 |
commit | 259ec5fb53ced9294d0c95637b0120980998eb7d (patch) | |
tree | 291d9c1d0b10100f6ccfe98e37340f0f5d3ba6a8 | |
parent | 978b038415c514f70919a32aaf716830349ff52c (diff) | |
download | eclipse.platform.swt-259ec5fb53ced9294d0c95637b0120980998eb7d.tar.gz eclipse.platform.swt-259ec5fb53ced9294d0c95637b0120980998eb7d.tar.xz eclipse.platform.swt-259ec5fb53ced9294d0c95637b0120980998eb7d.zip |
Bug 391269 - NPE pressing enter on DateTime widget if using SWT.TIME
only
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java index 61076d20d7..8d4e172d73 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java @@ -558,7 +558,9 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) { switch (keyCode) { case 76: /* KP Enter */ case 36: /* Return */ - hideCalendar(); + if ((style & SWT.DROP_DOWN) != 0) { + hideCalendar (); + } sendSelectionEvent (SWT.DefaultSelection); } } |