mirror of https://github.com/buggins/dlangui.git
Merge pull request #442 from pezipink/tree-clear-fix
tree.clear() fixed
This commit is contained in:
commit
f92d83c624
|
@ -139,7 +139,13 @@ class TreeItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
|
foreach(c; _children) {
|
||||||
|
c.parent = null;
|
||||||
|
if(c is root.selectedItem)
|
||||||
|
root.selectItem(null);
|
||||||
|
}
|
||||||
_children.clear();
|
_children.clear();
|
||||||
|
root.onUpdate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@property TreeItem parent() { return _parent; }
|
@property TreeItem parent() { return _parent; }
|
||||||
|
|
Loading…
Reference in New Issue