diff options
author | Scott Kovatch | 2010-11-16 17:36:33 +0000 |
---|---|---|
committer | Scott Kovatch | 2010-11-16 17:36:33 +0000 |
commit | 41f17972a2ef0178d3ef89eea24533c582214395 (patch) | |
tree | 00c702cd427db0fb8e255fb1bc5b2103b30ee75d | |
parent | 08b8ca5721c6ab3c670417551b4ed3346b5537a3 (diff) | |
download | eclipse.platform.swt-41f17972a2ef0178d3ef89eea24533c582214395.tar.gz eclipse.platform.swt-41f17972a2ef0178d3ef89eea24533c582214395.tar.xz eclipse.platform.swt-41f17972a2ef0178d3ef89eea24533c582214395.zip |
330299 - call sendDoubleSelection() on return key
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java | 3 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java index 1547c96fbb..c2e6f67f1b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java @@ -3004,6 +3004,7 @@ public void showSelection () { void sendDoubleSelection() { NSTableView tableView = (NSTableView)view; int rowIndex = (int)/*64*/tableView.clickedRow (); + if (rowIndex == -1) rowIndex = (int)/*64*/tableView.selectedRow(); if (rowIndex != -1) { if ((style & SWT.CHECK) != 0) { NSArray columns = tableView.tableColumns (); @@ -3027,7 +3028,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) { switch (keyCode) { case 76: /* KP Enter */ case 36: { /* Return */ - sendSelectionEvent (SWT.DefaultSelection); + sendDoubleSelection(); break; } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java index f70fc90292..6435469dee 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java @@ -2549,6 +2549,7 @@ public void select (TreeItem item) { void sendDoubleSelection() { NSOutlineView outlineView = (NSOutlineView)view; int rowIndex = (int)/*64*/outlineView.clickedRow (); + if (rowIndex == -1) rowIndex = (int)/*64*/outlineView.selectedRow (); if (rowIndex != -1) { if ((style & SWT.CHECK) != 0) { NSArray columns = outlineView.tableColumns (); @@ -2573,7 +2574,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) { switch (keyCode) { case 76: /* KP Enter */ case 36: { /* Return */ - sendSelectionEvent (SWT.DefaultSelection); + sendDoubleSelection(); break; } } |