summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2005-06-07 20:51:06 +0000
committerVeronika Irvine <veronika>2005-06-07 20:51:06 +0000
commit3d8528dbda503461b66680e5763ac0766e62900b (patch)
tree9ced696bd4dc89290b64bb9be4c4edfc585fbdda
parent59c8377857ca2f31f685636bd996bd9200feaf43 (diff)
downloadeclipse.platform.swt-3d8528dbda503461b66680e5763ac0766e62900b.tar.gz
eclipse.platform.swt-3d8528dbda503461b66680e5763ac0766e62900b.tar.xz
eclipse.platform.swt-3d8528dbda503461b66680e5763ac0766e62900b.zip
comment for SetDataBrowserSelectedItems bug
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java18
2 files changed, 27 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java
index 5517f400cf..6d51753509 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java
@@ -376,6 +376,15 @@ public void deselect (int [] indices) {
void deselect (int [] ids, int count) {
ignoreSelect = true;
+ /*
+ * Bug in the Macintosh. When the DataBroswer selection flags includes
+ * both kDataBrowserNeverEmptySelectionSet and kDataBrowserSelectOnlyOne,
+ * two items are selected when SetDataBrowserSelectedItems() is called
+ * with kDataBrowserItemsAssign to assign a new seletion despite the fact
+ * that kDataBrowserSelectOnlyOne was specified. The fix is to save and
+ * restore kDataBrowserNeverEmptySelectionSet around each call to
+ * SetDataBrowserSelectedItems().
+ */
int [] selectionFlags = null;
if ((style & SWT.SINGLE) != 0) {
selectionFlags = new int [1];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
index c8bf336c3f..064b767f20 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
@@ -505,6 +505,15 @@ int defaultThemeFont () {
public void deselectAll () {
checkWidget ();
ignoreSelect = true;
+ /*
+ * Bug in the Macintosh. When the DataBroswer selection flags includes
+ * both kDataBrowserNeverEmptySelectionSet and kDataBrowserSelectOnlyOne,
+ * two items are selected when SetDataBrowserSelectedItems() is called
+ * with kDataBrowserItemsAssign to assign a new seletion despite the fact
+ * that kDataBrowserSelectOnlyOne was specified. The fix is to save and
+ * restore kDataBrowserNeverEmptySelectionSet around each call to
+ * SetDataBrowserSelectedItems().
+ */
int [] selectionFlags = null;
if ((style & SWT.SINGLE) != 0) {
selectionFlags = new int [1];
@@ -1372,6 +1381,15 @@ int itemNotificationProc (int browser, int id, int message) {
OS.memcpy (ids, start [0], count * 4);
OS.HUnlock (ptr);
ignoreSelect = true;
+ /*
+ * Bug in the Macintosh. When the DataBroswer selection flags includes
+ * both kDataBrowserNeverEmptySelectionSet and kDataBrowserSelectOnlyOne,
+ * two items are selected when SetDataBrowserSelectedItems() is called
+ * with kDataBrowserItemsAssign to assign a new seletion despite the fact
+ * that kDataBrowserSelectOnlyOne was specified. The fix is to save and
+ * restore kDataBrowserNeverEmptySelectionSet around each call to
+ * SetDataBrowserSelectedItems().
+ */
int [] selectionFlags = null;
if ((style & SWT.SINGLE) != 0) {
selectionFlags = new int [1];