1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

delete when the parent is the tree itself

This commit is contained in:
David McKnight 2006-08-01 18:33:23 +00:00
parent c13f860b64
commit a9b455c205
2 changed files with 12 additions and 2 deletions

View file

@ -2012,12 +2012,17 @@ public class SystemView extends TreeViewer implements ISystemTree,
return Status.OK_STATUS;
if ((parentItem instanceof Item) && !getExpanded((Item)parentItem))
refresh(parent); // flush memory
else if (parentItem instanceof Tree)
{
refresh();
}
else
{
wasSelected = isSelectedOrChildSelected(multiSource);
if (wasSelected)
clearSelection();
_originatingViewer.remove(multiSource);
if (_originatingViewer != null)
_originatingViewer.remove(multiSource);
if (wasSelected)
setSelection(new StructuredSelection(parent),true);
}

View file

@ -2012,12 +2012,17 @@ public class SystemView extends TreeViewer implements ISystemTree,
return Status.OK_STATUS;
if ((parentItem instanceof Item) && !getExpanded((Item)parentItem))
refresh(parent); // flush memory
else if (parentItem instanceof Tree)
{
refresh();
}
else
{
wasSelected = isSelectedOrChildSelected(multiSource);
if (wasSelected)
clearSelection();
_originatingViewer.remove(multiSource);
if (_originatingViewer != null)
_originatingViewer.remove(multiSource);
if (wasSelected)
setSelection(new StructuredSelection(parent),true);
}