summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSilenio Quarti2012-11-28 11:05:23 (EST)
committer Bogdan Gheorghe2013-01-15 12:33:42 (EST)
commitb7d07f572f31f74973c3c0ecfbd4778ab7847caa (patch)
tree8863f51f32b437610981e46eae278b305f207ab5
parent1aabc0616b7dd8b42f031df74e2a774173dc9526 (diff)
downloadeclipse.platform.swt-b7d07f572f31f74973c3c0ecfbd4778ab7847caa.zip
eclipse.platform.swt-b7d07f572f31f74973c3c0ecfbd4778ab7847caa.tar.gz
eclipse.platform.swt-b7d07f572f31f74973c3c0ecfbd4778ab7847caa.tar.bz2
Bug 388402 - List gets into bad state when an item is removed from context menu trigger
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
index 150b67c..4be4ff7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
@@ -1104,14 +1104,21 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
}
boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
- if (type == SWT.MouseDown) {
- mouseIsDown = true;
- } else if (type == SWT.MouseUp || type == SWT.DragDetect) {
- mouseIsDown = false;
-
- if (rowsChanged) {
- rowsChanged = false;
- ((NSTableView)view).noteNumberOfRowsChanged();
+ boolean handleMouseDown = true;
+ if (nsEvent != null) {
+ int /*long*/ nsType = nsEvent.type();
+ handleMouseDown = nsType == OS.NSLeftMouseDown || nsType == OS.NSLeftMouseUp;
+ }
+ if (handleMouseDown) {
+ if (type == SWT.MouseDown) {
+ mouseIsDown = true;
+ } else if (type == SWT.MouseUp || type == SWT.DragDetect) {
+ mouseIsDown = false;
+
+ if (rowsChanged) {
+ rowsChanged = false;
+ ((NSTableView)view).noteNumberOfRowsChanged();
+ }
}
}
return super.sendMouseEvent(nsEvent, type, send);