changeset 286:da43988fb10d

RT-18961: TableViewKeyInputTest and TreeViewKeyInputTest fail on Mac
author jgiles
date Thu, 19 Jan 2012 10:19:13 +1300
parents f79a432737db
children b7684dc1fa3f
files javafx-ui-controls/test/javafx/scene/control/KeyEventFirer.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/test/javafx/scene/control/KeyEventFirer.java	Wed Jan 18 11:17:57 2012 +1300
+++ b/javafx-ui-controls/test/javafx/scene/control/KeyEventFirer.java	Thu Jan 19 10:19:13 2012 +1300
@@ -54,17 +54,17 @@
     }
     
     private KeyEvent createEvent(KeyCode keyCode, EventType<KeyEvent> evtType, KeyModifier... modifiers) {
-        List<KeyModifier> modifiersList = Arrays.asList(modifiers);
-        
+        List<KeyModifier> ml = Arrays.asList(modifiers);
+
         return KeyEvent.impl_keyEvent(
                 target, // EventTarget
                 null,     // Character (unused unless KeyCode == KEY_TYPED
                 null,     // text
                 keyCode.impl_getCode(), // KeyCode
-                modifiersList.contains(KeyModifier.SHIFT),    // shiftDown
-                modifiersList.contains(KeyModifier.CTRL),     // ctrlDown
-                modifiersList.contains(KeyModifier.ALT),      // altDown
-                modifiersList.contains(KeyModifier.META),     // metaData
+                ml.contains(KeyModifier.SHIFT),                                   // shiftDown
+                ml.contains(KeyModifier.CTRL),                                    // ctrlDown
+                ml.contains(KeyModifier.ALT),                                     // altDown
+                ml.contains(KeyModifier.META) || ml.contains(KeyModifier.CMD),    // metaData
                 evtType);  // eventType
     }
 }