aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2012-05-23 15:58:26 (EDT)
committerGrant Gayed2012-05-23 15:58:26 (EDT)
commitafc5f9bfaba706343e595bf206fc20be7c8fb8c0 (patch)
tree90ba793389402928d1893c7537d315305a599d35
parent0456c81b5decf95fd2322ad01e3348c1f260fbb7 (diff)
downloadeclipse.platform.swt-afc5f9bfaba706343e595bf206fc20be7c8fb8c0.zip
eclipse.platform.swt-afc5f9bfaba706343e595bf206fc20be7c8fb8c0.tar.gz
eclipse.platform.swt-afc5f9bfaba706343e595bf206fc20be7c8fb8c0.tar.bz2
Bug 378846 - Eclipse Crashes while clicking button when a table has the
focus
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java16
1 files changed, 13 insertions, 3 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 bb523df..132a70c 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
@@ -2331,6 +2331,13 @@ void register () {
}
void releaseChildren (boolean destroy) {
+ int count = itemCount;
+ itemCount = 0;
+ ignoreSelect = true;
+ ((NSOutlineView) view).reloadData ();
+ ignoreSelect = false;
+ itemCount = count;
+
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null && !item.isDisposed ()) {
@@ -2379,6 +2386,12 @@ void releaseWidget () {
*/
public void removeAll () {
checkWidget ();
+ int count = itemCount;
+ itemCount = 0;
+ ignoreSelect = true;
+ ((NSOutlineView) view).reloadData ();
+ ignoreSelect = false;
+ itemCount = count;
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null && !item.isDisposed ()) item.release (false);
@@ -2387,9 +2400,6 @@ public void removeAll () {
itemCount = 0;
imageBounds = null;
insertItem = null;
- ignoreSelect = true;
- ((NSOutlineView) view).reloadData ();
- ignoreSelect = false;
setScrollWidth ();
}