mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 17:45:24 +02:00
delete when the parent is the tree itself
This commit is contained in:
parent
c13f860b64
commit
a9b455c205
2 changed files with 12 additions and 2 deletions
|
@ -2012,12 +2012,17 @@ public class SystemView extends TreeViewer implements ISystemTree,
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
if ((parentItem instanceof Item) && !getExpanded((Item)parentItem))
|
if ((parentItem instanceof Item) && !getExpanded((Item)parentItem))
|
||||||
refresh(parent); // flush memory
|
refresh(parent); // flush memory
|
||||||
|
else if (parentItem instanceof Tree)
|
||||||
|
{
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wasSelected = isSelectedOrChildSelected(multiSource);
|
wasSelected = isSelectedOrChildSelected(multiSource);
|
||||||
if (wasSelected)
|
if (wasSelected)
|
||||||
clearSelection();
|
clearSelection();
|
||||||
_originatingViewer.remove(multiSource);
|
if (_originatingViewer != null)
|
||||||
|
_originatingViewer.remove(multiSource);
|
||||||
if (wasSelected)
|
if (wasSelected)
|
||||||
setSelection(new StructuredSelection(parent),true);
|
setSelection(new StructuredSelection(parent),true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2012,12 +2012,17 @@ public class SystemView extends TreeViewer implements ISystemTree,
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
if ((parentItem instanceof Item) && !getExpanded((Item)parentItem))
|
if ((parentItem instanceof Item) && !getExpanded((Item)parentItem))
|
||||||
refresh(parent); // flush memory
|
refresh(parent); // flush memory
|
||||||
|
else if (parentItem instanceof Tree)
|
||||||
|
{
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wasSelected = isSelectedOrChildSelected(multiSource);
|
wasSelected = isSelectedOrChildSelected(multiSource);
|
||||||
if (wasSelected)
|
if (wasSelected)
|
||||||
clearSelection();
|
clearSelection();
|
||||||
_originatingViewer.remove(multiSource);
|
if (_originatingViewer != null)
|
||||||
|
_originatingViewer.remove(multiSource);
|
||||||
if (wasSelected)
|
if (wasSelected)
|
||||||
setSelection(new StructuredSelection(parent),true);
|
setSelection(new StructuredSelection(parent),true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue