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

git-svn-id: svn://10.0.0.236/trunk@206476 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk
2006-08-03 08:54:46 +00:00
parent 43e6f825a9
commit ae05e43ed0

View File

@@ -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);
}
}