invalidate the best size when adding or deleting items

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

View File

@@ -1445,6 +1445,7 @@ wxTreeItemId wxGenericTreeCtrl::DoInsertItem(const wxTreeItemId& parentId,
parent->Insert( item, previous == (size_t)-1 ? parent->GetChildren().size()
: previous );
InvalidateBestSize();
return item;
}
@@ -1479,6 +1480,7 @@ wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text,
m_current->SetHilight( true );
}
InvalidateBestSize();
return m_anchor;
}
@@ -1539,6 +1541,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)
@@ -1603,6 +1606,8 @@ void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
m_select_me = NULL;
delete item;
InvalidateBestSize();
}
void wxGenericTreeCtrl::DeleteAllItems()