fix bug that treebox.clear only rm the 1st node

This commit is contained in:
Jinhao
2017-02-13 07:18:39 +08:00
parent a22954d8d8
commit eb7ae0d635
5 changed files with 17 additions and 9 deletions

View File

@@ -2175,8 +2175,8 @@ namespace nana
void treebox::clear()
{
auto impl = get_drawer_trigger().impl();
impl->attr.tree_cont.clear();
auto& tree_cont = get_drawer_trigger().impl()->attr.tree_cont;
tree_cont.clear(tree_cont.get_root());
get_drawer_trigger().draw();
}