diff --git a/src/widget/treeview.c b/src/widget/treeview.c index afd71d9..9791881 100644 --- a/src/widget/treeview.c +++ b/src/widget/treeview.c @@ -401,7 +401,7 @@ static void mwTreeViewSetLabelImpl(MwWidget handle, void* item, const char* labe free(e->label); e->label = MwStringDuplicate(label); - if(e->parent != NULL && e->parent->opened) { + if(e->parent == NULL || (e->parent != NULL && e->parent->opened)) { resize(handle); } }