Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2013-10-09 08:49:15 -0400
committerLakshmi Shanmugam2013-10-11 03:40:31 -0400
commit70a2f2c1c94e25b115c37690e0081e2501c12d38 (patch)
treee8ca6848b348d652dd4af65bce8854202cd82a33
parent68e82eff6910deb2bf408cc4927ac6e52e367ee1 (diff)
downloadeclipse.platform.swt-70a2f2c1c94e25b115c37690e0081e2501c12d38.tar.gz
eclipse.platform.swt-70a2f2c1c94e25b115c37690e0081e2501c12d38.tar.xz
eclipse.platform.swt-70a2f2c1c94e25b115c37690e0081e2501c12d38.zip
Bug 414371:Double click on current stack element in stack trace doesn't
focus editor.(missing selection event)
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java17
1 files changed, 10 insertions, 7 deletions
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 8e541d2ccb..ad5c4cfcaa 100644
--- 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
@@ -2035,10 +2035,7 @@ void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (widget.isRowSelected(row)) {
NSRect rect = widget.frameOfOutlineCellAtRow(row);
if (!OS.NSPointInRect(pt, rect)) {
- Widget item = itemID != null ? display.getWidget (itemID.id) : null;
- if (item != null && item instanceof TreeItem) {
- selectedRowIndex = this.indexOf ((TreeItem)item);
- }
+ selectedRowIndex = row;
}
}
}
@@ -2632,7 +2629,7 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
* selection event before MouseUp is sent. Ignore the next selection event.
*/
if (!dragDetected && selectedRowIndex != -1) {
- NSTableView widget = (NSTableView)view;
+ NSOutlineView widget = (NSOutlineView)view;
NSIndexSet selectedRows = widget.selectedRowIndexes ();
int count = (int)/*64*/selectedRows.count();
long /*int*/ [] indexBuffer = new long /*int*/ [count];
@@ -2645,9 +2642,15 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
}
Event event = new Event ();
- event.item = _getItem (null, selectedRowIndex, true);
+ id itemID = widget.itemAtRow (selectedRowIndex);
+ if (itemID != null) {
+ Widget item = display.getWidget (itemID.id);
+ if (item != null && item instanceof TreeItem) {
+ event.item = display.getWidget (itemID.id);
+ sendSelectionEvent (SWT.Selection, event, false);
+ }
+ }
selectedRowIndex = -1;
- sendSelectionEvent (SWT.Selection, event, false);
ignoreSelect = true;
}
dragDetected = false;

Back to the top