Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2020-01-10 09:23:09 +0000
committerNiraj Modi2020-02-03 09:52:18 +0000
commitee314c11282db5262166d5aaf3a7b7cbc4b27f2b (patch)
tree20534baf11e21dceabd2f48f1b558204e10fba0d
parentf5258910d1290329a1a4d5781e5a2ee8d222a13b (diff)
downloadeclipse.platform.swt-ee314c11282db5262166d5aaf3a7b7cbc4b27f2b.tar.gz
eclipse.platform.swt-ee314c11282db5262166d5aaf3a7b7cbc4b27f2b.tar.xz
eclipse.platform.swt-ee314c11282db5262166d5aaf3a7b7cbc4b27f2b.zip
Bug 352193 - SWT.CHECK and SWT.MULTI Table space checks only first
selected item (Windows fix) - Toggle checked state of the selected items when multiple items are selected and space is pressed. Change-Id: I6e65c0eb8e40cf36f3e1bf8692d8768475cc5586 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index fdfa4f1916..12bfa311db 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -5837,8 +5837,8 @@ LRESULT WM_CHAR (long wParam, long lParam) {
switch ((int)wParam) {
case ' ':
if ((style & SWT.CHECK) != 0) {
- int index = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
- if (index != -1) {
+ int index = -1;
+ while ((index = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, index, OS.LVNI_SELECTED)) != -1) {
TableItem item = _getItem (index);
item.setChecked (!item.getChecked (), true);
OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, index + 1);

Back to the top