invalidate the best size when adding or deleting items

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-04-26 01:04:47 +00:00
parent 1b3b96d84c
commit 96aaaff865

View File

@@ -1415,6 +1415,7 @@ wxTreeItemId wxGenericTreeCtrl::DoInsertItem(const wxTreeItemId& parentId,
parent->Insert( item, previous == (size_t)-1 ? parent->GetChildren().size()
: previous );
InvalidateBestSize();
return item;
}
@@ -1449,6 +1450,7 @@ wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text,
m_current->SetHilight( true );
}
InvalidateBestSize();
return m_anchor;
}
@@ -1509,6 +1511,7 @@ void wxGenericTreeCtrl::DeleteChildren(const wxTreeItemId& itemId)
wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
ChildrenClosing(item);
item->DeleteChildren(this);
InvalidateBestSize();
}
void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
@@ -1573,6 +1576,8 @@ void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
m_select_me = NULL;
delete item;
InvalidateBestSize();
}
void wxGenericTreeCtrl::DeleteAllItems()