diff options
author | Veronika Irvine <veronika> | 2005-12-22 17:45:24 +0000 |
---|---|---|
committer | Veronika Irvine <veronika> | 2005-12-22 17:45:24 +0000 |
commit | 15246974d41b1c694a3cd5cf10cc80f95117d1d8 (patch) | |
tree | b82b8bc80518a94bc29f33e5df689c680874dcc2 | |
parent | e43d24feae592c9cb4564dfe4f314d67d775e3eb (diff) | |
download | eclipse.platform.swt-15246974d41b1c694a3cd5cf10cc80f95117d1d8.tar.gz eclipse.platform.swt-15246974d41b1c694a3cd5cf10cc80f95117d1d8.tar.xz eclipse.platform.swt-15246974d41b1c694a3cd5cf10cc80f95117d1d8.zip |
Bug 120721 too many item compare callbacks make table slow
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java index aa041c627f..39daf9d20e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java @@ -2034,6 +2034,27 @@ void releaseChildren (boolean destroy) { super.releaseChildren (destroy); } +void releaseWidget () { + super.releaseWidget (); + /* + * Feature in the Mac. When RemoveDataBrowserItems() is used + * to remove items, item notification callbacks are issued with + * the message kDataBrowserItemRemoved When many items are + * removed, this is slow. The fix is to temporarily remove + * the item notification callback. + */ + DataBrowserCallbacks callbacks = new DataBrowserCallbacks (); + OS.GetDataBrowserCallbacks (handle, callbacks); + callbacks.v1_itemNotificationCallback = 0; + callbacks.v1_itemCompareCallback = 0; + OS.SetDataBrowserCallbacks (handle, callbacks); + + currentItem = null; + sortColumn = null; + paintGC = null; + imageBounds = null; +} + /** * Removes the item from the receiver at the given * zero-relative index. |