summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorLakshmi Shanmugam2012-05-23 15:58:26 (EDT)
committer Grant Gayed2012-05-23 16:04:05 (EDT)
commitd7fab8bf9eb7250e6125d7b69fdbdc31ee05e52e (patch)
treeaffd6b31c5ba5386703e3ac5bb5954d16803038c
parent4e86172036e416de93f171ebc5f31e0dfe88cf99 (diff)
downloadeclipse.platform.swt-d7fab8bf9eb7250e6125d7b69fdbdc31ee05e52e.zip
eclipse.platform.swt-d7fab8bf9eb7250e6125d7b69fdbdc31ee05e52e.tar.gz
eclipse.platform.swt-d7fab8bf9eb7250e6125d7b69fdbdc31ee05e52e.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 ();
}