tree.clear() fixed

This commit is contained in:
pezi_pink 2017-09-16 22:13:51 +01:00
parent f152eacf59
commit db47becae8
1 changed files with 6 additions and 0 deletions

View File

@ -139,7 +139,13 @@ class TreeItem {
}
void clear() {
foreach(c; _children) {
c.parent = null;
if(c is root.selectedItem)
root.selectItem(null);
}
_children.clear();
root.onUpdate(this);
}
@property TreeItem parent() { return _parent; }