Bug 346957 Reconnect the view to the tree after a reframe r+sr=roc

This commit is contained in:
neil%parkwaycc.co.uk 2006-08-03 08:54:46 +00:00
Родитель 1bd8804d41
Коммит 790344c5d8
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -161,7 +161,18 @@ nsTreeBoxObject::GetTreeBody()
NS_IMETHODIMP nsTreeBoxObject::GetView(nsITreeView * *aView)
{
if (!mView && GetTreeBody()) {
if (!mTreeBody) {
if (!GetTreeBody()) {
// Don't return an uninitialised view
*aView = nsnull;
return NS_OK;
}
if (mView)
// Our new frame needs to initialise itself
return mTreeBody->GetView(aView);
}
if (!mView) {
nsCOMPtr<nsIDOMXULElement> xulele = do_QueryInterface(mContent);
if (xulele) {
// See if there is a XUL tree builder associated with the element
@ -175,6 +186,7 @@ NS_IMETHODIMP nsTreeBoxObject::GetView(nsITreeView * *aView)
NS_ENSURE_TRUE(rv, rv);
}
// Initialise the frame and view
mTreeBody->SetView(mView);
}
}